Category Archives: Inheritance

Polymorphism in Java

This article contains… What is Polymorphism ? Reference variable types and Object Example of Polymorphism Runtime and Compiletime Polymorphism Example of both SCJP exam objective 5.2 Share on Tumblremail

email

Unit 8 (Prog 2) : Test Inner Class 2nd

In this example you will find Anonymous Inner class concepts, Inner class concepts in java, and also some tricks about Interface. /*  * TestAnonymousInnerClass.java  *  * This Example includes…  *          1. Method inside Interface with body.  *          2. Inner Class inside Interface.  *          3.… Read More »

Unit 2 (Prog 1) : Test Inheritance of class in JAVA

Inheritance Test for OCJP preparation… /*  * equals() method is defined under  * java.lang.Object class which is inherited by all class having main method  *  * thus every class is instance of java.lang.Object class  * Whenever you create a class, you automatically inherit all of class Object’s methods.  */ public class ch21TestClassInheritance {    … Read More »