Multiple choice technology programming languages

Assume you create a Student class with the variables name, ID, and course. You then create a method called gradeStudent. If you create a subclass of the Student class called GraduateStudent, what does it inherit?

  1. An instance of the Student class

  2. The course variable

  3. The gradeStudent method

  4. The ID variable

  5. The name variable

Reveal answer Fill a bubble to check yourself
B,C,D,E Correct answer
Explanation

In Java inheritance, a subclass inherits all accessible instance variables (name, ID, course) and methods (gradeStudent) from its superclass. It does not inherit an instance - that's not how inheritance works.