多项选择题
Which two methods, inserted individually, correctly complete the Three class?()
A.public void foo(){ }
B.public int foo(){return 3;}
C.public Two foo(){return this;}
D.public One foo(){return this;}
E.public Object foo(){return this;}
点击查看答案
相关考题
-
单项选择题
What is the result?()
A.3
B.23
C.32
D.123
E.321
F.Compilation fails.
G.An exception is thrown at runtime. -
单项选择题
What is the result?()
A.Hello
B.Hello World
C.Compilation fails.
D.Hello World 5
E.The code runs with no output.
F.An exception is thrown at runtime. -
多项选择题
Which four code fragments, inserted independently at line 7, will compile?()
A.public void m1(){}
B.protected void m1(){}
C.private void m1(){}
D.void m2(){}
E.pubic void m2(){}
F.protected void m2(){}
G.private void m2(){}
