public static void main(String[] args) { for (int i=0;i= 10;i++){ if( i6) break; } System.out.println(i); } What is the result?() A、 6B、 7C、 10D、 11E、 Compilation fails.F、 An exception is thrown at runtime.
public static void main(String[] args) { for (int i=0;i<= 10;i++){ if( i>6) break; } System.out.println(i); } What is the result?()
- A、 6
- B、 7
- C、 10
- D、 11
- E、 Compilation fails.
- F、 An exception is thrown at runtime.
相关考题:
下面有关java和c++的描述,错误的是()。A、java是一次编写多处运行,c++是一次编写多处编译B、c++和java支持多重承C、Java不支持操作符重载,操作符重载被认为是c++的突出特征D、java没有函数指针机制,c++支持函数指针
abstract class abstrctIt { abstract float getFloat (); } public class AbstractTest extends AbstractIt { private float f1= 1.0f; private float getFloat () {return f1;} } What is the result?() A、 Compilation is successful.B、 An error on line 6 causes a runtime failure.C、 An error at line 6 causes compilation to fail.D、 An error at line 2 causes compilation to fail.
以下描述正确的是()。A、CallableStatement是PreparedStatement的父接口B、PreparedStatement是CallableStatement的父接口C、CallableStatement是Statement的子接口D、PreparedStatement是Statement的父接口
Which statement is true?()A、 An anonymous inner class may be declared as final.B、 An anonymous inner class can be declared as private.C、 An anonymous inner class can implement multiple interfaces.D、 An anonymous inner class can access final variables in any enclosing scope.E、 Construction of an instance of a static inner class requires an instance of the enclosing outer class.