6. Working with Methods and Encapsulation


  • there is overlap between topics, which is unavoidable due to the organisation of the objectives
  • Touched on topics are introduced, but covered in other sections in much greater detail

1. Create methods with arguments and return values; including overloaded methods


  • Format of a method
  • Overloading
  • varargs

2. Apply the static keyword to methods and fields


  • static methods and fields
  • hiding static variables and methods in subclasses

3. Create and overload constructors; including impact on default constructors


  • Order of construction
  • default constructor
  • this() and super()

4. Apply access modifiers


  • private, package (default), protected, public

5. Apply encapsulation principles to a class


  • Encapsulation principles
  • JavaBeans

6. Determine the effect upon object references and primitive values when they are passed into methods that change the values


  • 'Pass by copy' in Java

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License