Tag Archives: OCJP

Unit 2 (Prog 6) : Test Static Keyword

This article covers basics of static keyword, static methods and static variables. /*  * STATIC METHODS :  * 1. Static method can not access non-static (Instance) variable or method.  * 2. Static method can not be overridden they are redefined.  */ Share on Tumblremail

email

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 »

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 »