单项选择题
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?()
A.add import animals.mammals.*; at line 2 in Salmon.java
B.add import animals.fish.*; at line 2 in GrizzlyBear.java
C.add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.java
D.add import animals.mammals.GrizzlyBear.*; at line 2 in Salmon.java B
相关考题
-
单项选择题
Given: When line 14 is reached, how many objects are eligible for the garbage collector?()
A.0
B.1
C.2
D.3
E.4 -
单项选择题
Given: What is the result?()
A.Compilation fails.
B.An exception is thrown at runtime.
C.doStuff x = 6 main x = 6
D.doStuff x = 5 main x = 5
E.doStuff x = 5 main x = 6 -
单项选择题
Given: and two separate command line invocations: java Yippee java Yippee 1 2 3 4 What is the result?()
A.No output is produced.1 2 3
B.No output is produced.2 3 4
C.No output is produced.1 2 3 4
D.An exception is thrown at runtime.1 2 3
