Hi Ragu, You can't access nonstatic() using the object reference b since this method is not visible to class Bill. But you can create an instance of the static class and access the method through it.

Correct me if I am wrong, Vanitha.

Ragu Sivaraman
Ranch Hand

Joined: Jul 20, 2001
Posts: 464

posted Aug 11, 2001 22:24:00

0

Originally posted by Vanitha Sugumaran: [B]Hi Ragu, You can't access nonstatic() using the object reference b since this method is not visible to class Bill. But you can create an instance of the static class and access the method through it.

Correct me if I am wrong, Vanitha.[/B]

thankx for your response Yeah it will work, but the irony is instance of a static class? hmmm sounds little weird to me... But i guess that seems to be the only way to access it Probably the compiler just ignores for a moment the top-level nested class and handles it to be just an non-static inner class? (I dont know, but it looks like it though) Just another X-files mysteries... Thankx guys and especially to Vanitha