• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is Container an abstract class??

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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??
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Nalini Mistry
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tony what is the j2ee doc?? would you pls give me a link to it?
 
maha anna
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 !!
reply
    Bookmark Topic Watch Topic
  • New Topic