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

[单项选择]下列程序执行后,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

更多"下列程序执行后,k的值是( )。     public clas"的相关试题:

[单项选择]下列程序执行后,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. 0
B. 1
C. 2
D. 3
[单项选择]下列程序执行后,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
[单项选择]下列程序执行后,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
[单项选择]下列程序执行后,b的值应是   public class Testss {    public static void main(String args[]) {     unsigned byte b=0;     b- -;     System.out.println("b="+b);    }   }
A. -1
B. 255
C. 127
D. 编译错误
[单项选择]下列程序执行后,j的值是( )。 public class Test { 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
[单项选择]下面程序执行后的输出结果为( )。 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 are you!
[单项选择]下列程序执行后,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
[单项选择]下列程序执行后,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. 私有派生的子类无法访问父类的成员
B. 类A的私有派生子类的派生类C无法初始化其祖先类A对象的属性,因为类A的成员对类C是不可访问的
C. 私有派生类不能作为基类派生子类
D. 私有派生类的所有子孙类将无法继续继承该类的成员
[单项选择]下列程序执行后,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

我来回答:

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

订单号:

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