aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is Container an abstract class?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Is Container an abstract class??" Watch "Is Container an abstract class??" New topic
Author

Is Container an abstract class??

Nalini Mistry
Ranch Hand

Joined: Mar 21, 2000
Posts: 64
RHE in the layout managers chapter says Container is an abstract class, but this is not supported by the API. when i tried this
import java.awt.*;
class Test {
public static void main(String args[]) {
Container c = new Container();
}
}
it compiled and executed without any error. Since nothing showed up on the screen, i am left wondering whether it is true or not. Container cannot be an abstract class since abstract classes cannot be instantiated. Just wanted to confirm whether it is an error in the RHE book . (Actually I read this at a couple of other places too, (that container is abstract but cannot recall precisely where) Can anyone confirm this for sure??
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
On p263 of Chapter 9 Layout Managers of RHE it says "The Container class was abstract, but now it isn't; ...".
Are you sure you are looking at The Complete JAVA 2 Certification Study Guide?
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Nalini,
Container class in NOT an abstract class.
Verify this here in Java API. Bookmark this API page and use it extensively.
Also check our Mock-Exam Errata page here for online_errataPage_links
regds
maha anna
[This message has been edited by maha anna (edited April 29, 2000).]
Nalini Mistry
Ranch Hand

Joined: Mar 21, 2000
Posts: 64
Well my copy pf RHE says "The Container class is abstract; its most common used ......". I guess its an error.
MA - can I follow this general rule of thumb : if the API and books differ, the Api is the final word?? Any known errors in the API ? (just the bits that are needed for the exam that is??) Would this be a safe rule to follow??
[This message has been edited by Nalini Mistry (edited April 30, 2000).]
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
I think we should go with API. If you want to make sure, just write a few lines of code and confirm it. Because the SCJP2 Exam is related to all materials from Sun.
regds
maha anna
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3219
As importantly, one should always look for the published errata of a technical book. I'm positive that Roberts and Heller DO NOT say that Container is an abstract class, if we include any errata.
An yes, the API always supercedes anything. Even when it has a lot of spelling errors especially the J2EE doc...


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Ajay Kumar
Ranch Hand

Joined: Apr 28, 2000
Posts: 87
Hi,
RHE in their new edition say the same thing as Edward Man has posted earlier. The ISBN of their new edition is 0-7821-2700-2.
I have heard that their new book with the above ISBN has a lot fewer errors.
Ajay Kumar


Regds<BR>Ajay Kumar
Nalini Mistry
Ranch Hand

Joined: Mar 21, 2000
Posts: 64
Tony what is the j2ee doc?? would you pls give me a link to it?
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Nalini,
It is Java2EnterpriseEdition I think. Now Tony is working on JavaBeans as a professional employee. So he is referring to the work he is doing right now.
regds
maha anna
Nalini Mistry
Ranch Hand

Joined: Mar 21, 2000
Posts: 64
Thanx MA!! Maybe after I've cleared the exam I'll ask Tony some more about the j2ee ::-): Guess i can happily forget about it till then !!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Is Container an abstract class??
 
Similar Threads
abstract classes
Marcus Question Bank id:249
Components vs Container (and Menu)
A question about container!
java.awt.Container