试题详情
单项选择题 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 the findSalmon( ) 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
  • 关注下方微信公众号,在线模考后查看

热门试题