Chapter 3. Methods and encapsulation
Exam objectives covered in this chapter |
What you need to know |
---|---|
[1.1] Define the scope of variables. | Variables can have multiple scopes: class, instance, method, and local. Accessibility of a variable in a given scope. |
[2.3] Know how to read or write to object fields. | Object fields can be read from and written to by directly accessing instance variables and calling methods. The correct notation to call methods on an object. Methods may or may not change the value of instance variables. Access modifiers affect access to instance variables and methods that can be called using a reference variable. Nonstatic methods can’t be called on uninitialized objects. |
[2.4] Explain an Object's Lifecycle ... |
Get OCA Java SE 8 Programmer I Certification Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.