单选题

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

正确答案

来源:www.examk.com

答案解析

相似试题
  • Given. Which two statements are true?()

    多选题查看答案

  • Given: Which two can be results?()

    多选题查看答案

  • Given Which two statements are true?()

    多选题查看答案

  • Given: Which two are true?()

    多选题查看答案

  • Given: Which two statements are true?()

    多选题查看答案

  • Given: Which two classes use the Shape class correctly?()

    多选题查看答案

  • Given: Which two, independently, will allow Sub to compile?()

    多选题查看答案

  • Given: Which two methods, inserted individually, correctly complete the Three class?()

    多选题查看答案

  • Given: Which two code fragments, inserted independently at line 13, will compile?()

    多选题查看答案

  • Given: Which two, placed on line 13, will produce the output gobstopper?()

    多选题查看答案