网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

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

  • A、 a
  • B、 b
  • C、 c
  • D、 d
  • E、 Compilation fails.

参考答案

更多 “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?()  A、 aB、 bC、 cD、 dE、 Compilation fails.” 相关考题
考题 当需要将一个函数bool isnumber(char c)声明为内联函数时,则此内联函数的函数原型为( )。A.enum bool isnumber(char c);B.define bool isnumber(char c);C.inline bool isnumber(char c);D.extem bool isnumber(char c);

考题 ( 12 )下列布尔变量定义中,正确并且规范的是A )BOOLEAN canceled = false;B)boolean canceled = false;C)boolean CANCELED = false;D)boolean canceled = FALSE;

考题 booleanbool=true;if(bool=false){System.out.println(“a”);}elseif(bool){System.out.println(“c”);}elseif(!bool){System.out.println(“c”);}else{System.out.println(“d”);}Whatistheresult?() A.aB.bC.cD.dE.Compilationfails.

考题 使用函数bool()判别以下哪一个值结果为true。() A.bool('')B.bool(1)C.bool(0)D.bool([])

考题 boolean a=false;boolean b=true;boolean c=(ab)(!b);boolean result=(ab)(!b); boolean result=(ab)(!b); 执行完后,正确的结果是( )。A.c=false;result=falseB.c=true,result=trueC.c=true;result=falseD.c=false;result=true

考题 下面程序段: boolean a=false; boolean b=true; boolean c=(a||b)(b); boolean result=(a|b)(b); 执行完后,正确的结果是A.c=false;result=falseB.c=true,result=trueC.c=true;result=falseD.c=false;result=true

考题 下列布尔变量定义中,正确并且规范的是A.BOOLEAN canceled=false;B.boolean canceled=false;C.boolean CANCELED=false;D.boolean canceled=FALSE;

考题 下列关于boolean类型的叙述中,正确的是( )。A.可以将boolean类型的数值转换为int类型的数值SX 下列关于boolean类型的叙述中,正确的是( )。A.可以将boolean类型的数值转换为int类型的数值B.可以将boolean类型的数值转换为字符串C.可以将boolean类型的数值转换为char类型的数值D.不能将boolean类型的数值转换为其他基本数据类型

考题 下面均为Java关键字的一组是()A、boolean,byte,long,trueB、byte, long,true,gotoC、goto ,Boolean,byte,trueD、bool, long,true,auto

考题 在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()A、直接返回会话对象B、当服务器已经创建了会话对象就返回该对象,否则返回nullC、直接返回nullD、当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回

考题 在C#中下列表达式不正确的是()。A、double a,double b=2,int c=3,a=b+cB、short a,byte b=2,byte c=3,a=b+cC、string a,string b=”1” string c=”2” a=b+cD、bool a,bool b=true,bool c=false a=b==c

考题 下面均为java关键字的一组是()A、boolean ,byte,long,assertB、byte,long,true,gotoC、goto,boolean,byte,nullD、boolean,long,false,auto

考题 假设变量$x=5,则表达式“$x4”的返回值类型是()。A、bool(false)B、bool(true)C、int(1)D、int(0)

考题 假设变量bool_x是一个布尔型(逻辑型)的变量,则下面正确的赋值语句是()A、bool_x="False"B、bool_x=.FalsE.C、bool_x=#False#D、bool_x=False

考题 将有三个boolean值的数组初始化为true的是()A、boolean[]b=newboolean[3]B、"boolean[]b={true,true,true}"C、"boolean[3]b={true,true,true}"D、"boolean[]b=newboolean[3];b={true,true,true}"

考题 Which is a method of the MouseMotionListener interface?()A、 Public void mouseMoved(MouseEvent)B、 Public boolean mouseMoved(MouseEvent)C、 Public void mouseMoved(MouseMotionEvent)D、 Public boolean MouseMoved(MouseMotionEvent)E、 Public boolean mouseMoved(MouseMotionEvent)

考题 Which determines if “prefs” is a directory and exists on the file system?()  A、 Boolean exists=Directory.exists (“prefs”);B、 Boolean exists=(new File(“prefs”)).isDir();C、 Boolean exists=(new Directory(“prefs”)).exists();D、 Boolean exists=(new File(“prefs”)).isDirectory();E、 Boolean exists=true;  Try{  Directory d = new Directory(“prefs”);  } catch (FileNotFoundException e) {  exists = false;  }

考题 You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. You need to check whether the currently logged-on user is a member of a role namedAdministrators. Which code segment should you use?()A、bool isMember = Roles.GetUsersInRole("Administrators").Any()B、bool isMember = Membership.ValidateUser(User.Identity.Name, "Administrators")C、bool isMember = Roles.GetRolesForUser("Administrators").Any()D、bool isMember = User.IsInRole("Administrators")

考题 You need to write a multicast delegate that accepts a DateTime argument.Which code segment should you use?()A、public delegate int PowerDeviceOn(bool result,DateTime autoPowerOff);B、public delegate bool PowerDeviceOn(object sender,EventArgs autoPowerOff);C、public delegate void PowerDeviceOn(DateTime autoPowerOff);D、public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 单选题如果已经定义了方法int f(bool b, int i),则以下方法中,哪一个不是合法的重载方法()。A double f(bool b, int i)B int f(double d, int i)C int f(bool b,int i, double d)D double f(bool d, int j)

考题 单选题在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()A 直接返回会话对象B 当服务器已经创建了会话对象就返回该对象,否则返回nullC 直接返回nullD 当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回

考题 单选题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?()A  aB  bC  cD  dE  Compilation fails.

考题 单选题Which determines if “prefs” is a directory and exists on the file system?()A  Boolean exists=Directory.exists (“prefs”);B  Boolean exists=(new File(“prefs”)).isDir();C  Boolean exists=(new Directory(“prefs”)).exists();D  Boolean exists=(new File(“prefs”)).isDirectory();E  Boolean exists=true;  Try{  Directory d = new Directory(“prefs”);  } catch (FileNotFoundException e) {  exists = false;  }

考题 单选题Which is a method of the MouseMotionListener interface?()A  Public void mouseMoved(MouseEvent)B  Public boolean mouseMoved(MouseEvent)C  Public void mouseMoved(MouseMotionEvent)D  Public boolean MouseMoved(MouseMotionEvent)E  Public boolean mouseMoved(MouseMotionEvent)

考题 多选题A JavaBeans component has the following field:  11. private boolean enabled;  Which two pairs of method declarations follow the JavaBeans standard for accessing this field?()Apublic void setEnabled( boolean enabled) public boolean getEnabled()Bpublic void setEnabled( boolean enabled) public void isEnabled()Cpublic void setEnabled( boolean enabled) public boolean isEnabled()Dpublic boolean setEnabled( boolean enabled) public boolean getEnabled()

考题 单选题当需要将一个函数bool isnumber(char c)声明为内联函数时,则此内联函数的函数原型为(  )。A enum bool isnumber(char c);B define bool isnumber(char c);C inline bool isnumber(char c);D extern bool isnumber(char c);

考题 单选题您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()A public delegate int PowerDeviceOn(bool, DateTime);B public delegate bool PowerDeviceOn(Object, EventArgs);C public delegate void PowerDeviceOn(DateTime);D public delegate bool PowerDeviceOn(DateTime);