B3.1 Fundamentals of OOP for a single classB3.1.3
Static vs Non-Static Variables and Methods
Distinguish between static and non-static variables and methods
SL + HL≈ 50 minCommand term: DistinguishPremium
In this lesson
- Distinguishing instance (non-static) variables from static (class) variables
- Distinguishing instance methods from static methods, and what each can access
- Deciding when to use a static member instead of an instance member
- Writing static variables, constants and methods in Java and Python
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnWhose data is it?
- CodeA shared counter
- LabOne shared value, many objects
- LearnStatic and instance methods
- CodeStatic constants and utility methods
- LearnStatic members in UML
- CheckStatic or instance?
- CheckQuick check
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 10 marks, with a self-marking markscheme.