Question: Consider the following classes: public class Book { public String getISBN ( ) { / / implementation not shown } / / constructors, fields, and

Consider the following classes:
public class Book
{
public String getISBN()
{
// implementation not shown
}
// constructors, fields, and other methods not shown
}
public class Dictionary extends Book
{
public String getDefinition(String word)
{
// implementation not shown
}
// constructors, fields, and methods not shown
}
The following declarations appears in a different class:
Book b = new Dictionary();
Dictionary d = new Dictionary();
Which of the following statements would compile?
I.
b.getISBN();
II.
b.getDefinition("wonderful");
III.
d.getISBN();

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!