File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes java.awt.Container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "java.awt.Container" Watch "java.awt.Container" New topic
Author

java.awt.Container

Ajit Deshpande
Greenhorn

Joined: Jun 15, 2000
Posts: 17
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.
Paul Smiley
Ranch Hand

Joined: Jun 02, 2000
Posts: 244
I'm pretty sure that as of Java 2, Container is no longer abstract.
Ajit Deshpande
Greenhorn

Joined: Jun 15, 2000
Posts: 17
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?
Eric Barnhill
Rancher

Joined: Feb 25, 2000
Posts: 233

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
Suma Narayan
Ranch Hand

Joined: Apr 03, 2000
Posts: 136
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
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Contianer class is not abstract, however Component is ..I think you are confusing both of them ..Container implements the methods of Component
Ram Nath
Greenhorn

Joined: Jun 04, 2000
Posts: 29
Container class is a normal class in Java 2.0. It was an abstract in 1.1.
Ram
 
jQuery in Action, 2nd edition
 
subject: java.awt.Container