Which of the following declarations and initializations will not cause a compiler error?
Consider the following inheritance hierarchy that is used in a video game.
```
Character
/ \
Friend Villain
/ \ / \
WiseMan ShopKeeper Dragon Skeleton
| |
FlyingDragon EliteSkeleton
```
```
Character c = new FlyingDragon();
FlyingDragon f = new Character();
Dragon d = new Villain();
Villain v = new Skeleton();
Dragon d = new ShopKeeper();
```
What will be an ideal response?
The following are valid for this inheritance hierarchy because of the is-a relationship.
```
Character c = new FlyingDragon();
Villain v = new Skeleton();
```
You might also like to view...
Which of the following best describes the IntelliSense feature in Query Editor?
A. it is a database building wizard B. it is a text AutoComplete feature C. it is a visual query builder D. it is used to create tables
If you make changes to text in a frame on the original layout, that text is updated automatically in the alternate layout.
Answer the following statement true (T) or false (F)