下面哪个程序是语法正确的?
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
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
举一反三
- 下面哪个程序是语法类型正确的? A: foo::IO() foo=do line-getLine letn=readline::Int putStrLnn B: foo::IOString foo=do line-getLine letn=readline::Int putStrLnline C: foo::IO() foo=do line-getLine letn=readline::Int putStrLnn D: foo::IO() foo=do line-getLine letn=readline::Int putStrLn(shown)
- 下面哪个程序是语法正确的? 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 code, inserted at line 15, allows the class Sprite to compile?() A: Foo{public int bar(){return 1;}} B: new Foo{public int bar(){return 1;}} C: new Foo(){public int bar(){return 1;}} D: new class Foo{public int bar(){return 1;}}
- 中国大学MOOC: 当n = 5时,下列函数的返回值是:( ) int foo(int n) { if (n < 2) return n; return foo(n - 1) + foo(n - 2);}
- 读代码: 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); } } 结果是: