6. Working with Methods and Encapsulation

Note:

  • 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


Topics:

  • Format of a method
  • Overloading
  • varargs



2. Apply the static keyword to methods and fields


Topics:

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



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


Topics:

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



4. Apply access modifiers


Topics:

  • private, package (default), protected, public



5. Apply encapsulation principles to a class


Topics:

  • Encapsulation principles
  • JavaBeans



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


Topics:

  • 'Pass by copy' in Java



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