A.if
B.so that
C.while
D.whenever
第1题:
He______________be hungry一he's just had lunch.
A. can't
B. must
C. ought to
D. might
第2题:
以下程序的运行结果为?
class ValHold{
public int i = 10;
}
public class ObParm{
public static void main(String argv[]){
ObParm o = new ObParm();
o.amethod();
}
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.print( v.i );
}
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.print(v.i);
System.out.print(i);
}
}
A.10030
B. 20030
C. 209930
D. 10020
第3题:
8、设有下面的一个类定义: class AA { static void show(){ System.out.println(“我喜欢Java!”); } } class BB { void show(){ System.out.println(“我喜欢C++!”); } } 若已经使用AA类创建对象a和BB类创建对象b,则下面哪一个方法调用是正确的?()
A.show() b.show()
B.AA.show() BB.show()
C.AA.show() b.show()
D.a.show() BB.show()
第4题:
设有下面的两个类定义: class AA{ void Show ( ) {System.out.println ("I Like Java"):} } class BB extends AA} void Show ( ) {System.out.println ("I like C++"); } } 则顺序执行如下语句后输出的结果为( )。 AA a; BB b; a.Show (); b.Show ();
A.I Like Java I Like C++
B.I Like C++ I Like Java
C.I Like Java I Like Java
D.I Like C++ I Like C++
第5题:
第6题:
【单选题】System.out对象中输出换行的方法是
A.print()
B.println()
C.printf()
D.show()