This is found out in the IBM mock exam can someone help me out to find which all are true ? 1) An interface can contain a nested top-level inner class 2)A member inner class can implement an interface. 3)A static method can contain a local class 4)A static method can contain a nested top-level class 5)An interface can contain a member inner class. In my opinion 2,3,4,5 are correct, can anyone throw some light?
What he means is that if a inner class is defined as being static is becomes a top-level [inner] class. This only applies to those inner classes defined as static. Answers to questions : 1, 2, 3, 5 This compiles fine for answer 1:-
This compiles fine for answer 3:-
This compiles fine for answer 5:-
David. [This message has been edited by David Harrigan (edited December 14, 2000).]
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!
Gift giving made easy with the permaculture playing cards