aspose file tools*
The moose likes Mock Exam Errata and the fly likes MindQ question #47 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Mock Exam Errata
Bookmark "MindQ question #47" Watch "MindQ question #47" New topic
Author

MindQ question #47

Nain Hwu
Ranch Hand

Joined: Sep 16, 2001
Posts: 139
47. In the list below, which subclass(es) of Component cannot be directly instantiated:
a) Panel
b) Dialog
c) Container
d) Frame
The answer is c.
I thougt b should be the answer, since Dialog would need a
Frame to help instantiate it.
I am confused. :confused So I wrote a code to test it as below.
It compiled without error and ran.


Any thought?
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Nain,
Think you're right. All the Dialog constructors take an 'owner' as an argument.
The question is a little misleading, as you can instantiate a Dialog if you pass in an 'owner'. Perhaps they mean which one can't stand on it's own?
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Nain Hwu
Ranch Hand

Joined: Sep 16, 2001
Posts: 139
Thanks, Jane. It clears my doubt.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MindQ question #47