题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-04-24 22:34:31

[多项选择] package sun.scjp;  public enum Color { RED, GREEN, BLUE }  package sun.beta;  // insert code here  public class Beta {  Color g = GREEN;  public static void main( String[] argv)  { System.out.println( GREEN); }  }  The class Beta and the enum Color are in different packages.  Which two code fragments, inserted individually at line 2 of the Beta declaration, will allow this code to compile?()
A.  import sun.scjp.Color.*;
B.  import static sun.scjp.Color.*;
C.  import sun.scjp.Color; import static sun.scjp.Color.*;
D.  import sun.scjp.*; import static sun.scjp.Color.*;
E.  import sun.scjp.Color; import static sun.scjp.Color.GREEN;

更多"package sun.scjp;  public"的相关试题:

[多项选择]                         下列解释正确的是()
A. out_applet.java中一定有一个参数是“display_string” 
B. 具有两个属性“name”和“value” 
C. value是参数的名称 
D. “good morning”通过 标记传递给“Our_Applet.class”
[单项选择] 现有:     class Pencil  {  public void write (String content){     System.out.println ("Write"+content);     }     }  class RubberPencil extends Pencil{     public void erase (String content){     System.out.println ("Erase"+content);     }     }  执行下列代码的结果是哪项?()      Pencil pen=new RubberPencil();      pen.write ("Hello");      pen.erase ("Hello");    
A.  Write Hello        Erase Hello
B.  Erase Hello        Write Hello
C. 编译错误
D. 运行时抛出异常
[多项选择]  public class Foo {   private int val;   public foo(int v) (val = v;) }   public static void main (String args) {   Foo a = new Foo (10);   Foo b = new Foo (10);   Foo c = a;   int d = 10;   double e = 10.0;   }   Which three logical expression evaluate to true? ()
A.  (a ==c)
B.  (d ==e)
C.  (b ==d)
D.  (a ==b)
E.  (b ==c)
F.  (d ==10.0)
[单项选择] public class Pet{     private String name;     public Pet(){  System.out.print(1);    }  public Pet(String name){        System.out.print(2);    } }  public class Dog extends Pet{     public Dog(String name){        System.out.print(3);    } }  执行new Dog(“棕熊”);后程序输出是哪项?() 
A.  23
B.  13
C.  123
D.  321
[单项选择] 现有      public class Parentt      public void change (int x){)     )      public class Child extends Parent{     //覆盖父类change方法     }      下列哪个声明是正确的覆盖了父类的change方法?()    
A.   protected void change (int x){}
B.   public void change(int x,  int y){}
C.   public void change (int x){}
D.   public void change (String s){}
[单项选择] class TestMain {       static int x = 2;    static { x = 4; }   public static void main(String... args) {     int y = x + 1;   System.out.println(y);    }  }    和命令行:  java TestMain   结果为:()  
A.  3
B.  5
C.  编译失败
D.  运行时异常被抛出
[简答题] 一般程序如下:                ORG  2000H      ARY      DW   --4,3,--2,1   CNT      DW   $--ARY   VAR      DW   ARY,$+4          ┆           MOV  AX,ARY              MOV  BX,OFFSET VAR               MOV  CX,CNT               MOV  DX,VAR+2              LEA  SI,ARY            ┆   此程序段执行后,寄存器AX,BX,CX,DX与SI中的内容各是多少? 
[单项选择] 现有:      1  Interface F{}  2  class A implements F{}      3  class B extends A{}      4  class C extends B{  5    public static void main(String[]  args){      6    B b=new B();  7    //inSert C0de here      8    }      9    } 下列哪行代码插入到第7行,将抛出java.lang.ClassCaseException异常()
A.    A a=b;
B.   F f=  (C)b;
C.   F f=  (A)b;
D.   B bb=  (B)(A)b;
[单项选择] Given the script   create script db_backup_datafile_script  {backup datafile and 1, and2 plus archivelog delete input;} Run {execute script db_backup_datafile_script using 2;}   What is the result of running this command?()  
A.  The script will fail since you instructed RMAN to back up only one datafile rather than two
B.  The script will successfully back up datafile 3 without error
C.  The script will fail since it uses a substitution variable which is not supported
D.  The execute script command will prompt for the value of and2 since it’s not included in the command
E.  The script will fail because you cannot use the plus archivelog command when backing up
[单项选择] class TestMain {   static int x = 2;   static { x = 4; }   static public void main(String[] args) {   int y = x + 1;   System.out.println(y);  }  }   和命令行:   java TestMain   结果为:()
A.  3
B.  5
C.  编译失败
D.  运行时异常被抛出
[单项选择] class Account {   private int balance;   public void setBalance(int b) { balance = b; }  public int getBalance() { return balance; }   public void clearBalance() { balance = 0; }   }   哪一个改变可以使 Account 类线程安全?() 
A. 在第2行加 synchronized 修饰符。
B. 在第3行加 synchronized 修饰符。
C. 在第3行、第4行和第6行加 synchronized 修饰符。
D. 在第4行、第6行和第8行加 synchronized 修饰符。
[单项选择]  public class ArrayTest {   public static void main (Stringargs) {   float f1, f2;   f1 = new float [10];  f2 = f1;   System.out.printIn (“f2[0]=” + f2[0]);   }  }   What is the result?()
A.  It prints f2[0] = 0.0
B.  It prints f2[0] = NaN
C.  An error at line 5 causes compile to fail.
D.  An error at line 6 causes compile to fail.
E.  An error at line 6 causes an exception at runtime.
[单项选择] public class MyExample{    public static void main(String args[])    {         System.out.println(args[2])   }} 如果以下列命令行运行:  java MyExample Aptech online 上述代码将输出()。 
A. MyExample
B. Aptech
C. Online
D. 产生异常: "java.lang.ArrayIndexOutOfBoundsException"
[单项选择] A  System  p  customer  has  installed  components  from  the  Linux  ToolBox.  By  default,  which  of  the following directories will contain the open source commands such as gzip, gunzip and zcat()
A. /opt/freeware/bin
B. /usr/bin/freeware
C. /var/freeware/bin
D. /usr/sbin/freeware
[单项选择]  You work with a SQL Server 2005 database that provides banking information for customers. You want customers to see banking reports that combine data that is retrieved from the database with real-time investment information that comes from a Web service provided by a third party. The investment information must be current when the reports are executed. You need to create the appropriate objects that support the reports.  What should you do?()
A.  Publish the data in the database as an XML Web service by using the FOR XML AUTO clause. 
B.  Create a table to store the banking information for each customer. Create a trigger that fires when data is inserted into the table that joins with the data coming from the Web service. 
C.  Create a Transact-SQL stored procedure that uses a temporary table to store the banking information for each customer. Update the table with the values from the Web service. 
D.  Have a developer in your company create an assembly that calls the remote Web service. Create aCLR function by using the assembly. Call the CLR function and combine the results with banking information in the database.
[单项选择] 现有:      class Pencil  {  public void write (String content){  System.out.println ("Write"+content);     }     }  class RubberPencil extends Pencil{     public void write (String content){  System.out.println ("Rubber Write"+content);     }  public void erase (String content){     System.out.println ("Erase "+content);     }     } 执行下列代码的结果是哪项?()  Pencil pen=new RubberPencil();      pen.write("Hello");     
A.   Write Hello
B.   Rubber Write Hello
C. 编译错误
D. 运行时抛出异常
[单项选择] 现有:      class TestApp{  public  static  void main (String[]  args){      int [5]   myarray={ 10, 11, 12, 13, 14);      int sum=0;  for (int x  :  myarray)     sum+=x;  System. out. println( "sum= "+sum);     }     }  上述程序运行后的结果是哪项?()     
A.  sum=10
B.  sum=70
C.  sum=60
D.  运行时抛出异常

我来回答:

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

订单号:

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