Can somebody let me know why there will be compile time error at 1 and 2 and why it will not be at 3. I always get confused with instantiating these inner classes. I would really appreciate if somebody can help me out in this.
[ August 07, 2005: Message edited by: Barry Gaunt ]
Sherry, I encourage you to take a little extra time to use the full english words "you", "your", "are" instead of the abreviations "u", "ur", "r". You have plenty of space here, and your posts will look more professional (useful if your next boss wants to get certified )
Thank you for your posts, they are much appreciated. -Barry
Originally posted by Barry Gaunt: Sherry, I encourage you to take a little extra time...
Hi Barry Thanx alot 4 the suggession. I'd definitely take care next time. But the reason why I use the short forms is so that I can give the reply ASAP (As Soon As Possible ) before anyone else replies. And the reason is that I want 2 check my knowledge and speed of thought too !!
...and your posts will look more professional (useful if your next boss wants to get certified )
definitely I would like to be as professional as YOU want me to be because it will matter to my boss too.
<code> new Test038().new Nested().method("first"); //1 Wrong </code>
Here Object.new <Nested class> is not making any sense. The rigth way to do it is: <code> (new Test038.Nested()).method("hello"); //1 Right. </code>
BTW, static members (other then nested classes) can be accesed from objects also. Consider following: <code> static String hello= "Hello"; //Define a static class member ...... ...... (new Test038.Nested()).method(new Test038().hello); //1 Right. </code> [ August 07, 2005: Message edited by: Devender Thareja ]