题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-30 20:11:30

[单项选择]下列语句序列执行后,k的值是 ( )
public class c9
public static void main(String[]args)
int a=10,b=18,c=30;
switch(b%A)
case 7:c--;break
case 8:c-=2;break;
case 9:c-=3;break;
default : c * =b;break;

System.out.println(C) ;


A. 28
B. 29
C. 27
D. 540

更多"下列语句序列执行后,k的值是 ( ) public class "的相关试题:

[单项选择]下列语句序列执行后,k的值是( )。
public class c6
public static void main(String[ ] args)
int a=10, b=18, c=30;
switch (b%
A. 29
B. 27
C. 30
[单项选择]下列语句序列执行后,k的值是( )。
public class Test
public static void main(String[] args)
int m=3, n=6, k=0;
while((m++)<(n--)) ++k;
System. out. println(k);


A. 0
B. 1
C. 2
D. 3
[单项选择]下列语句序列执行后,输出的结果是______。
public class ex37

public static void main(String[] args)

int a=13;
a%=a/5;
System.out.println (a);


A. 1 B. 13 C. 15 D. 55
[单项选择]下列语句序列执行后,j的值是______。
public class ex2

public static void main(String[] args)

int j=2, i=5;
while( j<i--)
j++;
System.out.println(j);


A. 3 B. 2 C. 4 D. 5
[单项选择]下列语句输出结果为( )。
public class test

public static void main(String args[])

byte b=011;
System.out.prinfin(b);


A. B
B. 11
C. 9
D. 011
[单项选择]下面语句执行后,i的值是______。
public class Test11

public static void main(String[] args)

int i=0;
for( int j=10; j>5&&i<5; j-=3,i+=2 )

i=i+j;

System. out.println (i);


A. 10 B. 9 C. 8 D. 12
[单项选择]阅读下列代码 public class Test 2005{ public static void main(String args[]){ Strings="Test"; switch(s){ case "Java":System.out.print("Java"); break; case "Language":System.out.print("Language"); break; case "Test":System.out.ptint("Test"); break; } } } 其运行结果是【 】
A. Java
B. Language
C. Test
D. 编译出错
[单项选择]下列程序执行后,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
[单项选择]下列程序执行后,k的值是
    public class Testhhh
     public static void main(String args[ ])
     
      inti=6,j=8,k=10,m=7;
      if(i>j| |m       k++;
      else k- -;
      System.out.println(k);
      
    
A)12
B)11
C)10
D)9

[单项选择]下列程序执行后,屏幕上显示的应是
public class Testyyy
public static void main(String[]args)
char charl[]=,’t’ ’e’’s],’t’;
char char2[]=’t’,’e’,’s’,’t’,’1’;
String s1=new String(char1);
String s2=new String(char2,0,4);
System.out.println(s1.equals(s2));


A. true
B. false
C. test
D. 编译错误
[单项选择]下列语句输出结果为( )。 public class test   public static void main (String args[])      int x=10,y=9;    boolean b=true;    System.out.println(x<y||!b);   

A. true
B. false
C. 1
D. 0
[单项选择]下面的程序执行后,屏幕上显示的应是( )。
public class Exam
public static void main(String[]args)
char char1[]='t','e','s','t';
char char2[]='t','e','s','t','l';
String s1=newString(charl);
String s2=newString(char2,0,4);
System.out.println(s1.equals(s2));


A. true
B. false
C. test
D. 编译错误
[单项选择]下面的程序执行后,屏幕上应显示______。
public class Test
public static void main(String[] args)
char char1[]='t','e','s','t';
char char2[]='t','e','s','t','1';
String s1=new String(char1);
String s2=new String(char2,0 ,4);
System.out.println(s1.equals(s2));


A. true
B. false
C. test
D. 编译错误
[单项选择]下面程序片段的运行结果是( )。
public class Test
public static void main (String args[])
int a=10,b=4,c=20,d=6;
System.out.println (a++ *b+c* --d);


A. 144
B. 160
C. 140
D. 164
[单项选择]下列代码段的执行结果是( )。
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 Sun

public static void main(String args[])

int a,b;
a=0;
b=0;
for(int m=1;m<=10;m++)

a=a+1;
b=0;
for(int j=1;j<=10;j++)

a=a+1;
b=b+2;


System.out.println(a+","+b);


A. 10,20
B. 20,110
C. 110,20
D. 200,110
[单项选择]运行下面的程序时,会产生( )。
public class Test
public static void main(String args[ ] )
int x =0;
int y = 2/x;
int z[ ] = 1,2,4,6;
int p=z[4];


A. ArrayIndexOutOfBoundsExcePtion异常
B. NumberFormatException异常
C. ArithmeticException异常
D. ArithmeticException异常和ArrayIndexOutOfBoundsExcePtion异常
[单项选择]下列程序执行后,屏幕上显示的应是( )。   public class Testyyy   {public static void main(String[]args)    { char charl[]={,’’t’’ ’’e’’’’s],’’t’’};     char char2[]={’’t’’,’’e’’,’’s’’,’’t’’,’’1’’};     String s1=new String(char1);     String s2=new String(char2,0,4);     System.out.println(s1.equals(s2));    }   }
A. true
B. false
C. test
D. 编译错误

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码