public
& private
The private
keyword should be used on fields/methods that should not be exposed to the environment outside the containing class.
final
This keyword can be used:
- in a class declaration to prevent inheritance
- in a method declaration to prevent overriding
- in a field declaration to prevent re-assignment.
static
This keyword allows an association of the field, or method, to its containing class, instead of a specific instance of the class.
abstract
This keyword can be used to declare a method without implementing anything within the parent class. It also can be used to declare an abstract class.