Originally posted by milind gadgil: Good Answers 1 is valid bcoz the declaration and then the instance block is valid java code. # 2 is not valid bcoz it should appear in the instance block to be valid.
SCJP 2(94%), SCBCD 5.0(86%), SCDJWS(86%), SCEA 5 (I-73%, II/III-88%)
The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn. - Alvin Toffler
Yes, it should be like that. That's why it was invalid, because a statement, like ht.put("new1", "10"); cannot exist by itself. Otherwise, you will get compilation error. [ November 08, 2002: Message edited by: ks wong ]