单项选择题

下面程序段的输出结果为( )。
public class Test

public static void main(String args[])

booleana,b,c;
a=(3<5);
b=(a==true);
System.out.println("a="+a+"b="+b);
c=(b==false);
System.out.println("b="+b+"c="+c);

A.a=true b=false
b=true c=true
B.a=true b=false
b=true c=false
C.a=true b=true
b=true c=false
D.a=false b=false
b=true c=false
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序段的输出结果是( )。 class Test public static void main(String args[]) MyThread t=new MyThread(); t.displayOutput( t has been createD ); t.start(); Class MyThread extends Thread public void displayOutput(String s) System.out.println(s); public void run() displayOutput( t is running. );
A.t has been created.
B.t has been created.
T is running.
C.t is running.
D.编译出错
单项选择题
下列程序的输出结果是( )。 public class ArrayTest public static void main(String args[]) int[]intArray=new int[3] for(int i=0;i<3;i++) intArray[i]=i+2; system.out.println( IntArray[ +i+ ] =intArray[i]); System.out.println( ---------- ); int arrLen=4; IntArray=new int[arrLen]; For(int j=intArray.length;j>=0;j--) intArray[-i]=j*3; system.out.println( hello +intArray[j]);
A.编译未通过
B.编译通过,但运行错误
C.可以运行,但有错误
D.以上都不对
相关试题
  • 当使用Thread t=new Thread(r)创建一...
  • 请阅读下列程序代码,然后将程序的执行结果...
  • break语句最常见的用法是在switch语句中,...
  • FileInputStream是字节流,BufferedWriter...
  • 线程在生命周期中要经历5种状态,分别是新...