Note that there are some explanatory texts on larger screens.

plurals
  1. POIs Object a superclass of abstract classes?
    primarykey
    data
    text
    <p>I am wondering whether <code>Object</code> is superclasses of "loose" abstract classes as well, i.e. the abstract classes that do not extend other abstract classes. I don't see this mattering much in effect. But how is the "formal" wording on this one when putting things all together. </p> <p>The following support and contradict the Q in the subject line the way i see it:</p> <p>Supporting ("Yes" to Q above): i.) A concrete class can inherit from an abstract one, ii.) every class is a descendant of <code>Object</code>, and iii.) every class (except <code>Object</code>) has exactly one superclass. If <code>Object</code> weren't a superclass to abstract classes, then (iii) should necessarily be violated for the special case of <code>Object</code>-- "a class can have two superclasses iff one of them is <code>Object</code> and the other is an abstract one."</p> <p>Contradicting ("No" to Q): An abstract class cannot be sub to a concrete one, and <code>Object</code> is concrete. But then, this too can be phrased as "for the special case of <code>Object</code> class."</p> <p>Is it more on one side than the other, or is it merely something like "a bit of both-- exceptional for the <code>Object</code> class". thanks in advance. </p> <p><strong>Note</strong>: i read the discussions on <a href="https://stackoverflow.com/questions/2117689/why-java-lang-object-is-not-abstract">Why java.lang.Object is not abstract?</a>. </p> <p><strong>Correcting my obvious mistake in the original message above:</strong> Abstract classes can apparently inherit from concrete ones. That makes Object their superclass as well. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload