当前位置: 答题翼 > 问答 > 求职面试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

以下程序的运行结果为( )public class IfTest{public static void main(String args[]){int x=3;


以下程序的运行结果为()

public class IfTest{

public static void main(String args[]){

int x=3;

int y=1;

if(x==y)

System.out.println("Not equal");

else

System.out.println("Equal");

}

}

A、Not equal

B、Equal

C、无输出

D、编译出错

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • 以下程序的编译运行结果为:1: public class Q102: {3: public static void main(String[] args)4

  • 编译运行以下程序后 关于输出结果的说明正确的是()。 public class Conditional{ public static

  • 以下程序的编译和运行结果为?abstract class Base{abstract public void myfunc();public void

  • 以下程序的运行结果为class Prob10 {static boolean b1;public static void main(String [] args

  • 以下程序的运行结果为:1. public class Conditional {2. public static void main(String args [] ) {3. int x = 4;4. System.out.println( value is +((x >4 ? 99.99 : 9));5. }6. }

  • 编译和运行以下程序结果为:1: public class Q21 {2: int maxElements;3: void Q21() {4: maxEl