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

[单项选择] 现有:  class TestFoo f      int x;  String y;  int  getX()  {  return  x;  }     String getY()  {return y;  }      void setX (int  x)  {      int Z=7:      this.x=x;      }      可以添加多少个修饰符来封装此类?()     
A. 5
B. 4
C. 3
D. 2

更多"现有:  class TestFoo f"的相关试题:

[单项选择] A customer has a mixed environment of AIX on POWER4 and POWER5, and x86 based systems running a supported distribution of Linux. There is a total of 7 partitions and three standalone x86 servers. The customer wants to consolidate their applications using a single 4-core POWER6 server.  What is the minimum PowerVM edition that supports the customer requirement?()
A.  PowerVM Lx86
B.  PowerVM Express Edition
C.  PowerVM Standard Edition
D.  PowerVM Enterprise Edition
[单项选择] You deploy a Windows 7 Enterprise image to a computer on the network. You need to display the detailedactivation and license status of the computer.  What should you run?()
A. Msconfig.exe.
B. Slui.exe.
C. Slmgr.vbs and specify the dli parameter.
D. W.inrm.vbs and specify the id parameter.
[单项选择] The en0 interface on Node1 of a two-node cluster has failed. This adapter is configured with a boot addressand under stable operations also has the service address of the cluster’s single resource group. The resourcegroup is configured with the fallback option. The HA network was configured for IPAT via aliasing and now theservice address is on the en1 interface in the cluster. The en0 interface has already been physically replacedand configured with the boot address. Which of the following will return the cluster to its original state andminimize cluster downtime?()
A. Run cluster synchronization.
B. Restart cluster services on Node1.
C. Perform a swap_adapter using C-SPOC
D. Restart cluster services on both nodes
[单项选择] 现有:   class TestFoo {   int x;   String y;   int getX() { return x; }   String getY() { return y; }   void setX(int x) {   int z = 7;   this.x = x;   }    }    可以添加多少个修饰符来封装此类?() 
A.  2
B.  3
C.  4
D.  5
[单项选择] 现有:  class Banana2  f      static int X=2;  public static void main (String  []  args)  {     int X=2;   Banana2 b=new Banana2();     b.go(x);     }  static  {x+=x; }   void go (int x)  {    ++x;  System. out.println (x);    }         结果为:()    
A. 7
B. 5
C. 3
D. 2
[单项选择] 现有  import java.io.PrintWriter;      class  DoFormat{  public  static void main (String  []  args)  {      int x=42;  int y=12345;     float Z-7 ;  System.out.format("一%4d-",  X); System. out.format("-%4d-",  y);     System. out.format("-%4.ld-",z);      }      }      结果为:()     
A. 编译失败
B.   -42-  -1234- -7.0-
C.  - 42- -1234- -7.0-
D.  - 42- -12345- -7.0-
E. 运行时异常被抛出
[单项选择] 现有:  int x- reader.read();      下面哪一项正确?() 
A. 阅读器不是FileReader或者BufferedReader类型
B. 阅读器可以是FileReader或者BufferedReader
C. 阅读器可以是FileReader类型,但不能是BufferedReader类型
D. 阅读器可以是BufferedReader类型,但不能是FileReader类型
[单项选择] 现有:  class  Wrench2  {      int size;  public static void main(String  []  args)  {      Wrench2 w=new Wrench2();      w.size=II;  Wrench2 w2=go(w, w.size);     System. out .print (w2. size);      }  static Wrench2 go(Wrench2 wr. int s)  {      S=12;  return wr;     }     } 结果为()    
A.  11
B.  12
C. 编译失败
D. 运行时异常被抛出
[单项选择] 现有:  class Wrench f  public static void main(String  []  args)  {  Wrench w=new Wrench();    Wrench w2=new Wrench();     w2=go (w, w2);      System.out.print (w2==w);      }  static Wrench go (Wrench wrl,  Wrench wr2)  {     Wrench wr3=wrl; wrl=wr2; wr2=wr3;     return wr3;      }       结果是什么?()     
A.  false
B.  true
C. 编译失败
D. 运行的时候有异常抛出
[单项选择] 现有:  class Passer f  static final int X=5;  public  static void main (String  []  args)  {      new  Passer().go (x);      System. out .print (x);      }  void go (int x)  {     System. out .print(x++);     }     结果是什么?()     
A. 55
B. 56
C. 65
D. 66
[单项选择] 现有:   1. interface Altitude {   2.   //insert code here  3. }    和4个声明:  int HIGH = 7;   public int HIGH = 7;   abstract int HIGH = 7;   interface int HIGH = 7;    分别插入到第2行,有多少行可以编译?()  
A.  0
B.  1
C.  2
D.  3
E.  4
[单项选择] 现有:     class TestApp{  public  static  void main (String[]  args){      for (int  i=0; iif(i==3)      break;  System. out .print (i);     }     }     }  程序运行后的输出是哪项?()     
A. 0123
B. 012456789
C.   0123456789
D.   012
[单项选择] 现有:  String s="write a line to a file";     w.print(s+"/n");      哪一个是对的?() 
A. w即可以是PrintWriter类型,也可以足BufferedWriter类型。
B. w即不可以是PrintWriter类型,也不可以足BufferedWriter类型。
C. w可以是BufferedWriter类型,但不可以是PrintWriter类型。
D.  w以是PrintWriter类型,但不可以是BufferedWriter类型。
[单项选择] An  administrator  is  attempting  to  update  a  software  product.  The  install  is  interrupted  by  a  system  failure.  Which of the following commands would be used to clean up the improperly applied filesets()
A. Ippchk -C
B. instfix -S
C. installp -c
D. installp -C
[填空题] Public class test (    Public static void main (String args) (   System.out.printIn (6^3);   )   )   What is the output? ()
[单项选择] public class test (    public static void main (String args) {    int i = 0xFFFFFFF1;  int j = ~i;   }    )   What is the decimal value of j at line 5?()
A.  0
B.  1
C.  14
D.  –15
E.  An error at line 3 causes compilation to fail.
F.  An error at line 4 causes compilation to fail.
[单项选择] An administrator created a .env file in a user’s home directory to configure a number of custom environment variables for a local application. However, after the user logs out and then logs back into the system, the custom variables are not being set What is the most likely reason that the custom .env file is being ignored?()
A. A shell other than ksh is being used by the user.
B. The line ’export ENV=$HOME/.env’ is missing from /etc/profile.
C. The line ’export ENV=$HOME/.env’ is missing from the user’s .profile.
D. The env_profile attribute is not defined for the user within /etc/security/user.
[单项选择] abstract class abstrctIt {   abstract float getFloat ();   }   public class AbstractTest extends AbstractIt {   private float f1= 1.0f;   private float getFloat () {return f1;}   }   What is the result? ()
A.  Compilation is successful.
B.  An error on line 6 causes a runtime failure.
C.  An error at line 6 causes compilation to fail.
D.  An error at line 2 causes compilation to fail.
[多项选择] public void test() {     try { oneMethod();  System.out.println("condition 1");  }  catch (ArrayIndexOutOfBoundsException e) {     System.out.println("condition 2");     }  catch(Exception e) {  System.out.println("condition 3");     }  finally {  System.out.println("finally");    }  }  Which will display if oneMethod run normally?()    
A.  condition 1
B.  condition 2
C.  condition 3
D.  finally

我来回答:

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

订单号:

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