An instantiable class is a class in which we can create instances.
An instantiable class will include data members and methods.
Data members of a class refer to the instance and class variables and constants of the class.
An object’s properties are maintained by a set of data members.
Class methods can access only the class variables and class constants.
Instance methods can access all types of data members of the class.
Public methods define the behavior of an object.
Private methods and data members (except certain class constants) are considered internal details of the class.
Components (data members and methods) of a class with the visibility modifier private cannot be accessed by the client programs.
Components of a class with the visibility modifier public can be accessed by the client programs.
A method may or may not return a value. One that does not return a value is called a void method.
A constructor is a special method that is executed when a new object is created. Its purpose is to initialize the object into a valid state.
An instantiable class may (and commonly does) have multiple constructors.
Memory space for local variables and parameters is allocated when a method is called and deallocated when the method terminates.
Arguments are passed to the methods using the call-by-value scheme where the value of an argument is passed. The value is the actual data in the case of primitive data type and a reference to an object in the case of reference data type.
A public method that changes a property of an object is called a mutator.
A public method that retrieves a property of an object is called an accessor.
Methods with the same name are called overloaded methods.
Dot notation is optional when you call a method from another method of the same object. If dot notation is used, then the reserved word this must be used.
Dot notation is optional when you refer to a data member of an object from a method of the same object. If dot notation is used, then the reserved word this must be used.
An instantiable class can be set as the main class of a program by adding the main method to it. In the main method, an instance of this class is created.
(Optional section) Programmer-defined classes can be grouped into a programmer-defined package.