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

[单项选择]下列程序执行后,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 Testddd{"的相关试题:

[单项选择]下列程序执行后,i的值是  public class Testfff {  pubic static void main(String args[])   {     int i;10;     do { i/=2;}     while(i- - >1);     System.out.println(i);    }   }
A. 1
B. 5
C. 2
D. -1
[单项选择]阅读下面程序 public class ConcatTest {  public static void main(String[] args) {   String str1="abc";   String str2="ABC":   String str3=str1.concat(str2);   System.out.println(str3);  } } 程序运行的结果是
A. abc
B. ABC
C. abcABC
D. ABCabc
[单项选择]阅读下面程序 public class Cycle {  public static void main(String[] args) {   System.out.println(args[0]);  } } 在命令行输入java Cycle one two,该程序输出的结果是
A. Cycle
B. one
C. two
D. 以上三个选项都不对
[单项选择]阅读下面程序 public class MyVal {  public static void main(String[]args) {   MyVal m=new MyVal( );   m.amethod( );  }  public void amethod( ) {   boolean b[]=new Boolean[5];  } } 程序编译或运行的结果是
A. 1
B. null
C. ""
D. 编译不通过
[单项选择]阅读下面程序 public class Increment }  public static void main(String args[]) {   int c;   c=5;   System.out.println(C) ;   System.out.println(c++);   System.out.println(C) ;  } } 程序运行的结果是
A. 5 6 6
B. 5 5 6
C. 6 7 7
D. 6 6 6
[单项选择]

阅读下面程序
public class ConcatTest{
public static void main(String[] args) {
String strl = "abc";
String str2 = "ABC";
String str3 = str1.concat(str2);
System.out.println(str3);
}
}
程序的运行结果是:()


A. abe
B. ABC
C. abcABC
D. ABCabc
[单项选择]下列程序执行后,m的值是  public class Testbbb {   public static void main (String args[ ]) {    int a=10,b=3,m=5;    if(a= =B) m + =a;    else m:+ +a*m;    System.out.println(m);   }   }
A. 15
B. 50
C. 55
D. 5
[单项选择]下列程序执行后,chl的值是( )。   public class Testccc{    public static void main(Stringargsr[ ])    {     char chl=''A'',ch2=''T'';     if(chi+5<ch2)++ch1;      System.out.println(ch1);    }   }
A. 1和1
B. 1和1.0
C. 1.0和1
D. 1.0和1.0
[单项选择]下列程序执行后,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
[单项选择]下列程序执行后,k的值是 ( ) public class Testhhh { publicstaticvoidmain(Stnngargs[]) { int i=6,j=8,k=10,m=7; if(i>j||m<k- -) k+ +; else k--; System.out.println(k);
A. 12
B. 11
C. 10
D. 9
[单项选择]下列程序执行后,k的值是( )。     public class TestDemo {      public static void main(String args[ ]) {      int m=3,n=6,k=0;       while((m++)<(--n) )        ++k;        System.out.println(k);       }     }
A. final
B. this
C. super
D. static
[单项选择]下列程序执行后,j的值是( )。   public class Testggg {     public static void main(String args[ ])     {      int j=1;      for(int i=7;i>0;i-=2)       j * =2;      System.out.println(j);     }   }
A. 15
B. 1
C. 32
D. 16

我来回答:

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

订单号:

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