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

[单项选择]  public class Foo {   public static void main (String []args) {   int i = 1;   int j = i++;   if ((i>++j) && (i++ ==j))  {           i +=j;          }        }      }   What is the final value of i?()  
A.  1
B.  2
C.  3
D.  4
E.  5

更多" public class Foo&en"的相关试题:

[单项选择] public class test (      private static int j = 0;  private static boolean methodB(int k) (  j += k;  return true;  )  public static void methodA(int  i)(  boolean b:     b = i < 10 | methodB (4);  b = i < 10 || methodB (8);  )  public static void main (String args[])(   methodA (0);  system.out.printIn(j);  )  )   What is the result?()  
A.  The program prints “0”
B.  The program prints “4”
C.  The program prints “8”
D.  The program prints “12”
E.  The code does not complete.
[填空题] Public class test (    Public static void stringReplace (String text) (    Text = text.replace („j„ , „i„);    )      public static void bufferReplace (StringBuffer text) (    text = text.append (“C”)   )      public static void main (String args ){  String textString = new String (“java”);    StringBuffer text BufferString = new StringBuffer (“java”);      stringReplace (textString);    BufferReplace (textBuffer);      System.out.printIn (textString + textBuffer);    }   )   What is the output?()
[简答题] 已知下列一组语句:           ORG  2000H  ARY  DW   3,$+4,5,6  CNT  EQU  $ —ARY          DB   7,8,CNT,9  执行语句MOV AX,ARY+2和MOV  BX,ARY+10后,AX和BX分别是多少?画出内存分配图。
[多项选择] public class ConstOver  {   public ConstOver (int x, int y, int z) {   }  }   Which two overload the ConstOver constructor? ()
A. ConstOver(){}
B. Protected int ConstOver (){}
C. Private ConstOver (int z, int y, byte x) {}
D. Public Object ConstOver (int x, int y, int z) {}
E.  Public void ConstOver (byte x, byte y, byte z){}
[单项选择] public class SwitchTest {   public static void main (String args) {   System.out.PrintIn(“value =” +switchIt(4));   }   public static int switchIt(int x) {   int j = 1;   switch (x) {   case 1: j++;   case 2: j++;   case 3: j++;  case 4: j++;   case 5: j++;   default:j++;   }   return j + x;   }   }   What is the output from line 3? ()
A.  Value = 3
B.  Value = 4
C.  Value = 5
D.  Value = 6
E.  Value = 7
F.  Value = 8
[多项选择] public class OuterClass {   private double d1 1.0;   //insert code here   }   You need to insert an inner class declaration at line2. Which two inner class declarations are valid?()
A.  static class InnerOne {  public double methoda() {return d1;}  }
B.  static class InnerOne {  static double methoda() {return d1;}  }
C.  private class InnerOne {  public double methoda() {return d1;}  }
D.  protected class InnerOne {  static double methoda() {return d1;}  }
E.  public abstract class InnerOne {  public abstract double methoda();  }
[多项选择] public class MethodOver {   private int x, y;   private float z;   public void setVar(int a, int b, float c){   x = a;   y = b;   z = c;   }   }   Which two overload the setVar method?()
A.  void setVar (int a, int b, float c){  x = a;  y = b;  z = c;  }
B.  public void setVar(int a, float c, int b) {  setVar(a, b, c);  }
C.  public void setVar(int a, float c, int b) {  this(a, b, c);  }
D.  public void setVar(int a, float b){  x = a;  z = b;  }
E.  public void setVar(int ax, int by, float cz) {  x = ax;  y = by;  z = cz;  }
[单项选择] Given the following code:     if (x>0) {  System.out.println("first");  }     else if (x>-3) {  System.out.println("second");  }     else {  System.out.println("third");  }  Which range of x value would print the string "second"?()    
A.  x > 0
B.  x > -3
C.  x <= -3
D.  x <= 0 & x > -3
[单项选择] 1. package foo;  2.    3. import java.util.Vector;  4.    5. private class MyVector extends Vector {  6. int i = 1;  7. public MyVector()  {  8. i = 2;  9.    }  10. }  11.    12. public class MyNewVector extends MyVector {  13. public MyNewVector ()  {  14. i = 4;  15. }  16. public static void main (String args [])  {  17. MyVector v = new MyNewVector();  18.   }  19. }     The file MyNewVector.java is shown in the exhibit.  What is the result?()  
A.  Compilation will succeed.
B.  Compilation will fail at line 5.
C.  Compilation will fail at line 6.
D.  Compilation will fail at line 14.
E.  Compilation will fail at line 17.
[多项选择] String s= "hello";     String t = "hello";  char c[] = {’h’,’e’,’l’,’l’,’o’} ;     Which return true?()   
A.  s.equals(t);
B.  t.equals(c);
C.  s==t;
D.  t.equals(new String("hello"));
E.  t==c;
[简答题] 海尔现代物流系统的建设案例       海尔在连续16年保持80%的增长速度之后,近两年来又悄然进行.着J一场重大的管理革命。这就是在对企业进行全方位流程再造的基础之上,建立了具有国际水平的自动化、智能化的现代物流体系,使企业的运营效益发生了奇迹般的变化,资金周转达到一年15次,实现了零库存、零运营成本和与顾客的零距离,突破了构筑现代企业核心竞争力的瓶颈。 海尔集团在构建核心竞争力的过程中紧紧抓住了哪些关键环节?
[单项选择] 现有:  void topGo()  {      try  {  middleGo();  }  catch  (Exception e)  {      System.out.print("catch");      }      }  void middleGo()  throws Exception  {     go();  system.out.print("late middle");     }  void go()  throws ExceptiOn  {     throw new Exception();     } 如果调用 topGo () ,则结果为:() 
A.  late middle
B.  catch
C.  late middle catch
D.  catch Iate middle
[简答题] 说明下面两条语句的功能:     CMP  AX, 0     JNE   T

我来回答:

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

订单号:

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