Tag Archives: java

Unit 2 (prog 7) : Test clone() method

In this Example, you can find the Cloneable interface and Clone method usage in java. and also various ways to create object in java. /*  * Object cloning is a way to create exact copy of an object.  * To use clone() method of java.lang.Cloneable interface, class must implement it else CloneNotSupportException will be thrown.… Read More »

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 1 (Concept 1) : Access Modifiers in java

Visibility of the properties  of class for different access modifiers  ——————————————————————————————————————– 1) From the same class           Public , Protected, Private and Default 2) From any class in same package           Public, Protected and Default 3) From a subclass in same package          … Read More »