可学答题网 > 问答 > OCJP(310-065)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

Given two files, Grizz


Given two files, GrizzlyBear.java and Salmon.java: If both classes are in the correct directories for their packages,and the Mammal class correctly defines thefindSalmon() method, which change allows this code to compile?()

  • Aadd import animals.mammals.*; at line 2 in Salmon.java
  • Badd import animals.fish.*; at line 2 in GrizzlyBear.java
  • Cadd import animals.fish.Salmon.*; at line 2 in GrizzlyBear.java
  • Dadd import animals.mammals.GrizzlyBear.*; at line 2 in Salmon.java  B
参考答案
参考解析:
分类:OCJP(310-065)题库
相关推荐

1、Given: Which two statement

Given:Which two statements are true about the result if the default locale is Locale.US?()AThe&e...

2、Given a file GrizzlyBe

Given a file GrizzlyBear.java: 1. package animals.mammals; 2. 3. public class GrizzlyBear extends ...

3、Given: Which two, independ

Given:Which two, independently, will allow Sub to compile?()AChange line 2 to:public int a;BChang...

4、Given: Which two, inserted

Given:Which&ensp;two,&ensp;inserted&ensp;at&ensp;line&ensp;11,&ensp;will&ensp;allow&ensp;the&ensp;code&ensp;to&ensp;compile?()Apublic&ensp;class&ensp;MinMax<...

5、Given: Which two code&ensp

Given:Which&ensp;two&ensp;code&ensp;fragments,&ensp;inserted&ensp;independently&ensp;at&ensp;line&ensp;3,&ensp;generate&ensp;the&ensp;output&ensp;4247?&ensp;()...

6、Given: Which two code&ensp

Given:Which&ensp;two&ensp;code&ensp;fragments,&ensp;inserted&ensp;independently&ensp;at&ensp;line&ensp;5,&ensp;will&ensp;compile&ensp;without&ensp;warnings?()A...