Question: Given the following code segment: class Human { double height=60.0; ... } class Athlete extends Human { double height=63.5; double weight=230.5; ... } public class

Given the following code segment: class Human { double height=60.0; ... } class Athlete extends Human { double height=63.5; double weight=230.5; ... } public class CA { public static void main (String[] args) { Human a1 = new Athlete(); System.out.println(a1.height); } } Question: What is the output of the above code segment?
230.5
60.0
63.5
None of the above

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!