You are given the below Java code: 1 public class Student( public String name; public double gpa; @Override 3 4 public String toString () ( return "Student"; 8 ) public class GraduateStudent extends...


You are given the below Java code:<br>1 public class Student(<br>public String name;<br>public double gpa;<br>@Override<br>3<br>4<br>public String toString () (<br>return

Extracted text: You are given the below Java code: 1 public class Student( public String name; public double gpa; @Override 3 4 public String toString () ( return "Student"; 8 ) public class GraduateStudent extends Student { public int age; @override 10 11 12 public String toString() ( 13 return "Graduate Student"; 14 15 } 16 public class MainClass{ public static void main (String[] args) { Student A= new GraduateStudent (); GraduateStudent B - new GraduateStudent (); System.out.println (A. tostring ()): System.out.println (B.toString ()); 17 18 19 20 21 22 23 a) What will be printed out by line 20 in the above code? b) What will be printed out by line 21 in the above code? :

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here