7. Static & Non-Static class MyClass2{ int me=6; public static void main(String [ ] args){ System.out.println(me); } }
8. Static & Non-Static class MyClass3 static{ System.out.println(“Hey! How is it Possible”); } }
9. Objects class MyClass4{ //Body } class MainMethod{ p s v main(String[ ] a){ MyClass4 myObj=new MyClass4(); //other statements } }
10. Objects class MainMethod{ p s v main(String[ ] a){ MyClass4 myObj=new MyClass4(); MyClass4 myObj2=myObj; MyClass 4 myObj3=myObj; //other statements } } How Many Objects?
13. Wrapper Classes Classes that allows you to define objects that encapsulates each of the data types. Each of the Basic type as equivalent defined classes. byte Byte short Short int Integer long Long float Float double Double character Character boolean Boolean