题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-17 01:02:14

[单项选择]下面语句执行后,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

更多"下面语句执行后,i的值是______。 public class "的相关试题:

[单项选择]下面语句执行后,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
[单项选择]下列语句序列执行后,K的值是______。 public class Test11 { 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
[单项选择]下列语句执行后,i的值是( )。
public class Test

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. 8
B. 9
C. 10
D. 12
[单项选择]下列语句序列执行后,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 c6{ 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. 30
[单项选择]下列语句序列执行后,k的值是______。
public class Testll

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. 27
C. 29
D. 540
[单项选择]下列语句序列执行后,k的值是______。 public class Testll { 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. 27
C. 29
D. 540
[单项选择]下列语句序列执行后,输出的结果为______。 public class ex29 { public static void main(String[] args) { int a=2; int b=3; int c=7; int d=b&c; d=d<ad:~b; System.out.println(d); } }
A. 3
B. 2
C. 7
D. 4
[单项选择]下面程序执行后的输出结果为( )。
public class fun

public static void main(String args[])

String greets="How are you!";
String s=greets.substring(0,3);
System.out.println(S);


A. How
B. are.
C. you
D. how ate you!
[单项选择]下面程序执行后,输出的结果是( )。 public class Test { public static void main (String[] )args) { boolean m=true; if(m==false) System.out.println("假"); else if(m====true) System.out.println("真"); else System.out.println ("错误"); } }
A. 真
B. 假
C. 错误
D. 编译出错
[单项选择]下面的程序执行后,屏幕上显示的应是
public class Exam
public static void main(String[]args)
char char1[]=’t’,’e’,’s’,’t’;
char char2[]=’t’,’e’,’s’,’t’,’1’,;
String sl=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 Exam
public static void main(String[])args)
char char1[]=’t’,’e’,’s’,’t’;
char char2[]=’t’,’e’,’s’,’t’,’l’
String s1=new String(char 1);
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)

char ch1[]=’B’,’e’,’i’,’j’,’i’,’n’,’g’;
char ch2[]=’B’,’e’,’i’,’j’,’i’,’n’,’g’,’2’,’0’,’0’,’8’;
String s1 = new String(ch1);
String s2 = new String(ch2, 0, 7);
System. out. println(sl. equals(s2));


A. true
B. false
C. Beijing
D. 编译错误

我来回答:

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

订单号:

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