Compile time binding – JAVA

When we have different methods in super and derived class, it is very much clear at the time of compilation that which method are to be invoked or executed as …

super constructor – JAVA

super constructor provides us the facility to call a constructor of a super class from within the constructor of derived class. Call to the super constructor must always be the …

this constructor – JAVA

this constructor provides us the facility to invoked another constructor of the same class from within a constructor. e.g:      this(); And “this()” must be the first statement in constructor. …

Hierarchical inheritance – JAVA

The form of inheritance in which more than one classes are derived from single base class is known as hierarchical inheritance. We can implement the hierarchical inheritance by defining at …

Multilevel inheritance – JAVA

When a class is derived from another derived class is called multilevel inheritance. It is implemented by defining at least three classes. In multilevel inheritance, there is one base class …

Single Inheritance – JAVA

When an only one class is derived from an existing base class is called single inheritance. Single inheritance is only possible if there are two classes which are inherit with …

for-each loop – JAVA

for-each loop provides the facility to trace the element of array starting from 0 and those up to size of array. It always takes one step increment (i++/i=i+1). e.g. for(int …

Methods in JAVA

A method consists of related set of statements to perform a specific task. Method may or may not return some value. Methods provides us the facility to use the same …

Types of variables in java

Types of variables in java Local Instance Class Reference   Local: The variables which are declared and defined inside a block are called local variables as their scope is local …