Which of the following statements are true regarding Inner Q1 classes or class where they are declared and instantiated. new SimpleInterface(){} ans : true new ComplexInterface(){} ans :true Myclass extends Object {} ans : true new Myclass extends Object {} ans: false abstrct class inner ans: true private class C ans: true new MyInterface(x) {} ans: false am i correct?? Q2 1. inner class can be instantiated only in it's enclosing class ans:false 2. they can be accessed only within the enclosing class ans:false 3. they cannot implement interface ans: false 4. they can access final varaibles and final methods within their declaration scope ans:true 5. Top level nested clas need not be instantiated: true am i right.pls explan?
deekasha gunwant
Ranch Hand
Joined: May 06, 2000
Posts: 396
posted
0
Hi Ken, In ur first ques. u got it all right except Myclass extends Object {} : ans is false because the word class is missing. the correct declaration should have been class Myclass extends Object {}
as far as secon ques goes for the first 4 options I agree with u. but option 5) i cud not get what does it mean? regards deekasha