Is a class a subclass of itself

A class is a subclass of itself.

Showing Answers 1 - 6 of 6 Answers

Debojit Deb

  • Sep 11th, 2005
 

A

  Was this answer useful?  Yes

Debojit Deb

  • Sep 11th, 2005
 

A class is

  Was this answer useful?  Yes

Debojit Deb

  • Sep 11th, 2005
 

No, a class is implictly a subclass of Object class. For example you can use use toString(), wait(), notify() etc. methods without using any object or class name prefix.

  Was this answer useful?  Yes

mrkab

  • Nov 15th, 2007
 

Yes, a class is considered to be a subclass of itself in many contexts.  Context is important, however, as in reality a class is not a strict subclass of itself and it is trivial to prove this with code.  Sun's own material often assumes this, for example, so it is likely that an interviewer will too.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions