public class Foo { public static void main (String args) { int i = 1; int j = i++; if ((i>++j) && (i++ ==j)) { i +=j; } } } What is the final value of i?()
A、 1
B、 2
C、 3
D、 4
E、 5
相关问题推荐
-
What is the result?()
A、 three
B、 other
C、 An exception is thrown at runtime.
D、 Compilation fails because of an error on line 12.
E、 Compilation fails because of an error on line 13.
F、 Compilation fails because of an error on line 15.
-
Which can be used to encode charS for output?()
A、 Java.io.OutputStream.
B、 Java.io.OutputStreamWriter.
C、 Java.io.EncodeOutputStream.
D、 Java.io.EncodeWriter.
E、 Java.io.BufferedOutputStream.
-
Which two are equivalent?()
A3/2
B3<2
C3*4
D3<<2
E3*2^2
F3<<<2
-
import java.io.*; public class Forest implements Serializable { private Tree tree = new Tree(); public static void main(String [] args) { Forest f= new Forest(); try { FileOutputStream fs = new FileOutputStream(”Forest.ser”); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(f); os.close(); } catch (Exception ex) { ex.printStackTrace(); } } } class Tree { } What is the result?()
A、 Compilation fails.
B、 An exception is thrown at runtime.
C、 An instance of Forest is serialized.
D、 A instance of Forest and an instance of Tree are both serialized.
-
Which four can be thrown using the throw statement?()
AError
BEvent
CObject
DThrowable
EException
FRuntimeException