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

[填空题]以下代码的运行结果是______。 public class exl5 { public static void main(String args []) { int i = 5; do { i--; if(i > 2) continue; }while(i < 0); System.out.println(i); } }

更多"以下代码的运行结果是______。 public class "的相关试题:

[单项选择]下列程序的输出结果是______。 public class exl5 { public static void main(String[] args) { int a=2, b=8,c=12; a1: while( a<--c } { a2: do { a+=c; if (c==b++) { continue a1; } }while (true); } System.out.print (a); } }
A. 52
B. 46
C. 38
D. 0
[单项选择]下面代码的运行结果是
public class Test
public static void main(String args[])
for(int i 0;i<3;i++)
if(i<2)
continue;
System.out.println(i);



A. 0
B. 1
C. 2
D. 3
[填空题]以下代码的运行结果是______。 public class exl4 { public static void main(String args []) { int i = O; while(i < 10) { i++; if(i == 5) continue; } System.out.println(i); } }
[单项选择]下面代码的运行结果是( )。
public class ConcatTest
public static void main (String[ ] args)
String str1 = "abc";
String str2 = "ABC";
String str3 = str1. coneat(str2);
System. out. println(str3);

A. abc
B. ABC
C. abcABC
D. ABCabc
[单项选择]下列代码的执行结果是   public class Test    public int aMethod( )       static int i=0;      i+ +;      System.out.println(i);         public static void main(String args[ ])      Test test = new Test( );      test.aMethod( );
A. 编译错误
B. 0
C. 1
D. 运行成功,但不输出
[单项选择]下列代码的执行结果是( )。
public class Test

public static void main(String args[])

int a=4,b=6,c=8;
String s="abc";
System.out.println(a+b+s+c);
System.out.println( );


A. ababcc
B. 464688
C. 46abc8
D. 10abc8
[单项选择]下列代码的执行结果是( )。
public class Test
public static void main(String[]args)
int[]x=0,1,2,3;
forint i=0;i<3;1+=2)
try
system.out.println(x[i+2]/x[i]+x[i+1]);
catch(ArithmeticException e)
System.out.println("error1");
catch(Exception e)
System.out.println("error2");




A. error1
B. error2
C. error1
D. 2
[填空题]

下列代码的执行结果是()。
public class Expression
public static void main(String[] args)
int v1=10,v2=99,v3=0;
System.out.println((v1<0)&&(v2/v3)==3);
 


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

public static void main(String args[ ])

int a =4,b=6,c=8;
String s ="abc";
System.out.println(a+b+s+c);
System.out.println( );


A. ababcc
B. 464688
C. 46abc8
D. 10abc8
[填空题]以下程序运行后输出的结果是______。 public class exl7 { public static void main(String args []) { int a = 0; for(int j = 1; j <= 20; j++) if(j%5 != 0) a = a + j; System.out.println (a);
[单项选择]下列程序的运行结果是( )。
public class Sun

public static void main(String args[ ])

int number,digits;
number=53;
if(number<10)
digits=1;
else
if(number<100)
digits=2;
else
digits=3;
System.out.println(digits);


A. 1
B. 2
C. 3
D. 0
[单项选择]下列代码的执行结果是( )。
public class Test
public static void main String args[])
String s1=new String("welcome");
String s2=new String("welcome");
System.out.println(s1==s2);
System.out.println(s1.equals(s2));


A. false,false
B. false,true
C. true,true
D. true,false
[单项选择]下列代码的执行结果是( )。

  public class Test

  public int aMethod( )

  static int i=0;

  1++;

  System.out.println(i):

  

  public static void main (String args[])

  Trest test=new Test ( );

  test aMethod( ):

  

  

A. 编译错误
B. 0
C. 1
D. 运行成功,但不输出

我来回答:

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

订单号:

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