a
b
c
d
Compilation fails.
第1题:
A.a
B.b
C.c
D.d
E.Compilationfails.
第2题:
A.bool('')
B.bool(1)
C.bool(0)
D.bool([])
第3题:
boolean a=false; boolean b=true; boolean c=(a&&b)&&(!b); boolean result=(a&b)&(!b); 执行完后,正确的结果是( )。
A.c=false;result=false
B.c=true,result=true
C.c=true;result=false
D.c=false;result=true
第4题:
下面程序段: boolean a=false; boolean b=true; boolean c=(a||b)&&(b); boolean result=(a|b)&(b); 执行完后,正确的结果是
A.c=false;result=false
B.c=true,result=true
C.c=true;result=false
D.c=false;result=true
第5题:
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println(”a=”+a+”b=+b) ; c=(b==false); System.out.printhln(”b=”+b+”c=”+c) ; } }
A.a=true b=false b=true c=false
B.a=true b=false b=true c=true
C.a=true b=true b=tree c=false
D.a=false b=false b=tree c=false
第6题:
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.printin( "a="+a+"b="+b) ; c-(b==false); System.out.println(b="+b+"e="+c) ; } }
A.a=true b=false b=true c=false
B.a=true b=false b=true c=true
C.a=true b=true b=true c=false
D.a=false b=false b=true c=false
第7题:
public void foo( boolean a, boolean b ){ if( a ) { System.out.println( “A” ); } else if ( a && b ) { System.out.println( “A&&B” ); } else { 17. if ( !b ) { System.out.println( “notB” ); } else { System.out.println( “ELSE” ); } } } What is correct?()
第8题:
在C#中下列表达式不正确的是()。
第9题:
boolean bool = true; if(bool = false) { System.out.println(“a”); } else if (bool) { System.out.println(“c”); } else if (!bool) { System.out.println(“c”); } else { System.out.println(“d”); } What is the result?()
第10题:
假设变量bool_x是一个布尔型(逻辑型)的变量,则下面正确的赋值语句是()
第11题:
double a,double b=2,int c=3,a=b+c
short a,byte b=2,byte c=3,a=b+c
string a,string b=”1” string c=”2” a=b+c
bool a,bool b=true,bool c=false a=b==c
第12题:
直接返回会话对象
当服务器已经创建了会话对象就返回该对象,否则返回null
直接返回null
当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回
第13题:
已知如下代码: boolean m=true; if (m==false) System.out.println("False"); else System.out.println("True"); 执行结果是( )。
A.假
B.Tree
C.None
D.An error will occur when running
第14题:
3下面程序段的输出结果为( )。 mblic class Test public static void main(String args[]) { boolean a,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=false
B.a=true b=false b=true c=true
C.a=true b=true b=true c=false
D.a=false b=false b=true c=false
第15题:
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,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=false
B.a=true b=false b=true c=true
C.a=true b=true b=true c=false
D.a=false b=false b=true c=false
第16题:
写出执行完下列代码段之后指定变量的值:
bool x=true ,y=false,z=false;
x=x&&y||z;
y=x||y&&z;
z=!(x!=y)||(y==z);
则x=false,y=【 】,z=【 】。
第17题:
下面均为Java关键字的一组是()
A、boolean,byte,long,true
B、byte, long,true,goto
C、goto ,Boolean,byte,true
D、bool, long,true,auto
第18题:
下面程序的结果为______。
include<iostream.h>
void main()
{
int 3=1,b=2;
bool c=1;
if(a>b)||c)cout<<“true”<<endl;
else
cout<<“false”<<endl;
}
第19题:
在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()
第20题:
假设变量$x=5,则表达式“$x<>4”的返回值类型是()。
第21题:
bool类型只有2种值,为真(true)和假(false)。()
第22题:
If a is true and b is true then the output is “A&&B”.
If a is true and b is false then the output is “notB”.
If a is false and b is true then the output is “ELSE”.
If a is false and b is false then the output is “ELSE”.
第23题:
对
错
第24题:
a
b
c
d
Compilation fails.