aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K&B quiz 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 "K&B quiz" Watch "K&B quiz" New topic
Author

K&B quiz

victor kamat
Ranch Hand

Joined: Jan 10, 2007
Posts: 247
In the K&B quiz on the CD one question states that " an is-a relationship always involves at least 2 class types".

I think think is not correct; the correct statement is: "An is-a relationship always involves at at least 1 class type and at least 1 other class type or interface type".

What about it guys ?
Svend Rost
Ranch Hand

Joined: Oct 23, 2002
Posts: 904
I guess it depends on your definition of a "class type"

how about an interface that implemented an interface? Shouldn't the answer
then be:
An is-a- relationship always involves atleast one class type or interfacetype and atleast one other class type or interface type



/Svend Rost
victor kamat
Ranch Hand

Joined: Jan 10, 2007
Posts: 247
I like your definition
Svend Rost
Ranch Hand

Joined: Oct 23, 2002
Posts: 904
Originally posted by victor kamat:
I like your definition

I didn't define it.. I cant remember how the JLS defines a class type, but
im pretty sure they mean a "Java class" (i.e. not an interface).

My point was, that perhabs the answer is what is is because it'll else get
unnessecary complicated(see the my "proposed answer"). The again.. perhabs
they are wrong .. what do I know

/Svend Rost
Javier Sanchez Cerrillo
Ranch Hand

Joined: Aug 02, 2006
Posts: 152
So..., An interface "is-a" class type?. If true K&B is OK, otherwise I think as victor posted an error in K & B or an ambiguous question or statement (which i think is an error).


SCJP 5.0 95%<br /> <br />The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.
Svend Rost
Ranch Hand

Joined: Oct 23, 2002
Posts: 904
Originally posted by Javier Sanchez Cerrillo:
So..., An interface "is-a" class type?. If true K&B is OK, otherwise I think as victor posted an error in K & B or an ambiguous question or statement (which i think is an error).


An interface is not a class type, it is an interface type (according to the
JLS).

/Svend Rost
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: K&B quiz