Hi ramya,
The statement
A class inside an interface is always public and static and cannot call the methods declared in the interface.
is not true.
For example, this code works:
and in the main(String[]):
The output is: Implemented method() called
So, you can call a method declared in the interface.
Note, that the method() in NestedClass must be marked public,
since it is implicitly declared public in EnclosingInterface
(cannot have weaker access privileges).
Cheers,
Maciej
[ March 07, 2005: Message edited by: Maciej Gulak ]
[ March 07, 2005: Message edited by: Maciej Gulak ]