易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

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?()   

    A

     3/2

    B

     3<2

    C

     3*4

    D

     3<<2

    E

     3*2^2

    F

     3<<<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?() 

    A

     Error

    B

     Event

    C

     Object

    D

     Throwable

    E

     Exception

    F

     RuntimeException

联系客服 会员中心
TOP