ace

illegal expressions

ace
Dec 14th, 2010
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Person p1 = new Student();
  2. Person p2 = new PhDStudent();
  3. // PhDStudent phd1 = new Student();
  4. PhDStudent phd1 = new PhDStudent();
  5. // Teacher t1 = new Person();
  6. Teacher t1 = new Teacher();
  7. Student s1 = new PhDStudent();
  8.  
  9. // s1 = p1;
  10. // s1 = p2;
  11. p1 = s1;
  12. // t1 = s1;
  13. s1 = phd1;
  14. // phd1 = s1;
Add Comment
Please, Sign In to add comment