题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-07-29 18:33:24

[单项选择]下列代码段的执行结果为( )。
public class BitOperator

public static void main(String args[ ])

int a=-67,b-116,c=78,d;
d=~C>>2&(a|~B) ;
System.out.println("d="+D) ;


A. d=70
B. d=67
C. d=78
D. d=116

更多"下列代码段的执行结果为( )。 public class BitO"的相关试题:

[单项选择]下列代码段的执行结果为( )。
public class BitOperator

public static void main(String args[ ])

int a=-67,b=116,c=78,d;
d=~c>>2&(a|~B) ;
System.out.println ("d="+D) ;


A. d=70
B. d=67
C. d=78
D. d=116
[单项选择]下列代码段的执行结果是( )。
public class Test

public static void main(String args[])

String s1=new String("hello");
String s2=new String"hello");
System.out.println(s1==s2);
System.out.println(s1.equal(s2));


A. true false
B. true true
C. false true
D. false false
[单项选择]下列代码段的执行结果是( )。 public class Test { public static void main(String args[ ]) { String s1= new String("hello"); String s2= new String("hello"); System.out.println(s1==s2); System.out.println(s1.equal(s2)); } }
A. true false
B. true true
C. false true
D. false false
[单项选择]下列代码段的输出结果为( )。
public class priority

public static void main(String args[])

int a=10,b=4,c=20,d=6;
System.out.println(a+c%b);
System.out.println(a++*b+c--d);


A. 1040
B. 1096
C. 8060
D. 96 60
[填空题]执行下列程序段后输出的结果是 【10】 。 public class Test{ public static void main(String args[]){ int x,y; for(y=1,x=1;y<=50;y++){ if(x>=10)break; if(x%2==1){ x+=5: continue; } x-=3; } System.out.println(y); } }
[填空题]执行下面的程序段,辅出结果为上 【8】 。 public class Q { public static void main (String argv[]) { int anar[]=new int[5]; System.out.pfintln(anar[0]); } }
[单项选择]执行下列程序段之后,输出的结果是______。
public class Test8

public StatiC void main (String[] args)

byte a=2;
short b=3;
long c=4;
c=a%b*4%b;
System. out.println (c);


A. 2
B. 1
C. -2
D. -1
[简答题]阅读以下程序代码,写出程序的输出结果。
public class Class35

public static void main(String[] args)

String s1=new String("0860371"),s2="0860371";
System. out. println(s1==s2);
System. out. println(s1. equals(s2));
System. out. println(s1. endsWith(s2)==s1. startsWith(s2));


[简答题]阅读以下程序代码,写出程序的输出结果。
public class Class33

public static void main(String[] args)

int a,b,c;
a=b=c=1;
boolean w;
w=a++>1&&++b>c++:
System. out. println(a+","+b+","+c+","+w);


[简答题]阅读以下程序代码,写出程序的输出结果。
public class Class32

public static void main(String[] args)

boolean x=true,y=false,z=false;
x=x&&y||z;
y=x||y&&z;
z=!(x!=y)||(y==z);
System. out. println(x+","+y+","+z);


[单项选择]下列代码的执行结果是______。 public class ex55 { public static void main(String args[] ) { String s1=new String("hello"); String s2=new String("hello"); System.out.print (s1==s2); System.out.print (","); System.out.println (s1.equals (s2)); } }
A. true, false
B. true, true
C. false, true
D. false, false
[单项选择]下面程序的执行结果是______。 public class ex27 { public static void main(String[] args) { try { return; } finally { System. out. print in ( "Finally" ); } }
A. 程序正常运行,并输出Finally
B. 程序正常运行,但不输出任何结果
C. 编译能通过,但运行时会出现一个异常
D. 因为没有catch字句,所以不能通过编译
[单项选择]下列程序执行后,k的值是( )。   public class Testddd{   public static void main(String args[ ])   {     inti;10,j=18 K=30;     switch(j-i)     { case 8:k++;      case 9:k+ =2;      case 10:k+ =3;      default:k/=j;     }    System.out.println(k);    }   }
A. 31
B. 32
C. 2
D. 33

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码