有一段 Java 应用程序,它的主类名是 Foo,那么保存它的源文件名可以是
A: Foo.java
B: foo.java
C: Foo.class
D: foo.class
A: Foo.java
B: foo.java
C: Foo.class
D: foo.class
举一反三
- 读代码: public class Test { public static void main (String args[]) { class Foo { public int i = 3; } Object o = (Object) new Foo(); Foo foo = (Foo)o; System.out.println(foo.i); } } 结果是:
- 下面哪个程序是语法正确的? A: foo::IO() foo=do line=getLine printline B: foo::IO() foo=do letline=getLine printline C: foo::IO() foo=do letline-getLine printline D: foo::IO() foo=do line-getLine printline
- 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;}
- 有一段java 应用程序,它的主类名是A,那么保存它的源文件名可以是( )。 A: java B: A.class C: A D: 都对
- 下面哪个程序是语法正确的? A: foo::IO() foo=do line-getLine n=readline::Int printn B: foo::IO() foo=do line-getLine n-readline::Int printn C: foo::IO() foo=do line-getLine letn=readline::Int printn D: foo::IO() foo=do letline=getLine letn=readline::Int printn