如果外部类Test中有一个匿名内部类,它将被编译成名为_________的类.
A: class
B: Test$class
C: A$Test.class
D: Test$1.class
E: Test&1.class
A: class
B: Test$class
C: A$Test.class
D: Test$1.class
E: Test&1.class
举一反三
- 如果外部类Test中有一个匿名内部类,它将被编译成名为_________的类. A: A.class B: Test$A.class C: A$Test.class D: Test$1.class E: Test&1.class
- 下列关于Test类的定义代码中,正确的是______。 A: class Test implements Runnable { public void run() {} public void someMethod() {} } B: class Test implements Runnable { public void run(); } C: class Test implements Runnable { public void someMethod(); } D: class Test implements Runnable { public void someMethod() {} }
- 下列哪个选项的java源文件代码片段是不正确的 A: package testpackage; public class Test{ } B: import jav i *; package testpaekage; public class Test { } C: import javi*; class Person { } public class Test { } D: import javi*; import jav aw*; public class Test{ }
- 下列类的定义中哪些是合法的抽象类?( ) A: sealed abstract class c1{abstract public void test() {} B: abstract sealed public viud test(); C: abstract class c1 { abstract void test(); //test()默认为私有,不合法 D: abstract class c1 {abstract public void test(); }
- 下面哪些代码段是正确的Java源程序? A: package testpackage; public class Test{//do something...} B: import java.io.*; package testpackage; public class Test{// do something...} C: import java.io.*; class Person{// do something...} public class Test{// do something...} D: import java.io.*; import java.awt.*; public class Test{// do something...}