I came across a question in the JavaExams mock test: Q) Which category does java.awt.Container belong in?(choose one) a: interface b: abstract class c: normal class d: none of the above The correct answer was given as c: normal class But the Container class is an abstract class so the right answer should be b:. or am I missing something. Please help.
I'm pretty sure that as of Java 2, Container is no longer abstract.
Joined: Jun 15, 2000
Chapter 9 of the RHE book under the section 'Containers and Components' says "The container class is abstract: its most commonly used concrete subclasses are Applet, Frame and Panel." Patrick Naughtons book on Java2 does'nt say anything about the class being abstract. Confused? Can anybody help please?
Container was abstract in 1.1 but is not abstract in 2. What you would do with one is another matter. I've never actually seen it used. Always check the RHE with the Errata at their site. The earlier versions have a lot of errors. Perhaps someone can provide the link. Eric
Ajith, I think you have the older version as the latest version which I have clearly says that Container class was abstract, but now it is'nt. As Eric says, please always check the errata. The link is here. Suma