jeudi 28 juillet 2016

Greenfoot query

I have declared and initialized an object of the class 'Car' in 'MyWorld' class('Car' is a sub-class of 'Actor' class and 'MyWorld' class is the sub-class of 'World' class, and both 'Actor' and 'World' class belong to the same package):-

Car c1 = new Car();

I am not able to use the above object reference variable c1 in the 'Car' class. Can anyone explain the concept behind this phenomenon?

Aucun commentaire:

Enregistrer un commentaire