Rt
Consider the class hierarchy shown below:
Animal
|
Mammal
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
Dog Cat Raccoon Swamp
(implements) (implements) Thing
( Washer ) ( Washer ) Consider the following code:
1. Raccoon rocky;
2. SwampThing pogo;
3. Washer wawa;
4.
5. rocky = new Raccoon();
6. wawa = rocky;
7. pogo = wawa;Which of the following statements is true?
这是一道scjp的题目,好像看上去接口能创建引用阿
Consider the class hierarchy shown below:
Animal
|
Mammal
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
/ / \ \
Dog Cat Raccoon Swamp
(implements) (implements) Thing
( Washer ) ( Washer ) Consider the following code:
1. Raccoon rocky;
2. SwampThing pogo;
3. Washer wawa;
4.
5. rocky = new Raccoon();
6. wawa = rocky;
7. pogo = wawa;Which of the following statements is true?
这是一道scjp的题目,好像看上去接口能创建引用阿
6.wawa = rocky;
上面对得太不整齐了,差点儿没看出来
第7句错了。
-==============
Right!