Was ist der Unterschied zwischen subClass sc = new subClass() und Oberklasse sc = new Unterklasse?

class superClass {}

class subClass extends superClass{}

public class test
{

    public static void main()

{

    superClass sc1 = new subClass();
    subClass sc2 = new subClass();
    //whats the difference between the two objects created using the above code?

}
}
InformationsquelleAutor flav | 2013-03-24
Schreibe einen Kommentar