Correct answers are 1, 2 and 5 as given in the s/w.
. You can have static field in a non-static inner class. But you have to make it constant. Obviously, a final static field is static.
ex:
class A
{
class B
{
final static int i = 10; //this is valid.
}
}
. Anonymous class can never be static. Even if defined in a static context. The very syntax conveys the answer. You always do:
new ActionListener(){ ... }
HTH,
Paul.
------------------
Get Certified, Guaranteed!
(Now Revised for the new
Pattern)
www.enthuware.com/jqplus
Your guide to
SCJD exam!
www.enthuware.com/jdevplus Try out the world's only WebCompiler!
www.jdiscuss.com [This message has been edited by Paul Anil (edited May 11, 2001).]
[This message has been edited by Paul Anil (edited May 11, 2001).]