• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is a class a subclass of itself?

 
rajsim
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Jaworski web site http://www.jaworski.com/java/certification/
Java 2 Programmer Exam Review Questions
I found the following question and answer
Q> Is a class a subclass of itself?
A> A class is a subclass of itself.
Is it true?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not according to the Java Language Specification. As usual though, different people may have their own definitions of terms which don't follow the JLS. I seriously doubt this particular point will come up on the exam; no one has mentioned it to my knowledge. Of course, that might just mean that no one thought it was worth commenting on, since the answer is fairly obvious IMO as long as you haven't read Jaworski.
 
rajsim
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jim,
Yes, it is obvious. That's why I was a little confused.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic