I am currently doing small exercises on classes.
Suppose you have 2 classes: Person (superclass) and Student (subclass)
the class Student is extending the class Person.
When creating new objects of type Student, when do use the following options:
option 1: student x= new student( ..);
option 2;( person x=new student( );
help me out please.(with explicit examples if possible)
thanks in advance.