试题详情
单项选择题 final class Tree {  private static String tree = "tree ";  String getTree() { return tree; }  }  class Elm extends Tree {  private static String tree = "elm "; public static void main(String [] args) {  new Elm().go(new Tree());  }  void go(Tree t) {  String s = t.getTree()+Elm.tree+tree+(new Elm().getTree());  System.out.println(s);  } }  结果为:() 

A、elm elm elm elm

B、tree elm elm elm

C、tree elm tree elm

D、编译失败

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题