hi i have one doubt
i wrote 2 classes student and person. in that i have only one methos with same name show(). these two classes are independent meaniig no inheritance or any thing.
i wrote another class with name Sample(main()) in that i create 2 objects.
in that i want to store object reference of student into person can do like this or any other alternative
Student st=new Student(); Person p=new Person(); p=(Person)Student; p.show();
what mistake i have done in this can u please assist me