Question: Given the class hierarchy within the image and the code BankAccount b = new SavingsAccount ( ) ; , which of the following is

Given the class hierarchy within the image and the code "BankAccount b = new SavingsAccount();", which of the following is true:undefined
Question 1 options:
The variable b points to a BankAccount object
The variable b points to a SavingsAccount object
The variable b could point either to a BankAccount object or SavingsAccount object
The code will not compile.

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!