+ 2
Java help
if pokemon is the superclass and pikachu is the subclass what is the difference between Pokemon p1=new Pokemon(); and Pokemon p1=new Pikachu();?
2 Answers
0
New pikachu() uses the pikachu subclasses constructor. Alternatively, new pokemon() uses the Pokemon superclass constructor.
0
what does it mean in the case of casting?