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
答案解析:有
微信扫一扫手机做题