Keywords Flashcards
Parameterised constructor
constructor with parameters
Default constructor
constructor without parameters that assign predetermined values to the fields of a class
OOP
Object Oriented Programming
Constructor
is called when an object is created/instantiated by a class
Protected(access modifier)
Can be accessed from classes that inherit from the class
Public(Access modifier)
Accessible from outside class(eg. Methods)
Private(Access modifier)
Not accessible from outside class(eg. Field)
Private(Access modifier)
Not accessible from outside class(eg. Field)
Non-static fields
belong to each object
Object
is instantiated from a class/created by class
Class provider
can make changes in the new version
Information hiding
when the inner workings of a class are hidden
Encapsulation
protecting data from unwanted access by packaging it in an object where it is only accessible through the object’s interface
Class
defines the template for an object or is the blueprint for an object
Data hiding
Making data accessible only to class members and projects object integrity by preventing unintended and intended changes