题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-03-11 01:18:28

[单项选择] public class Employee{       private String name;  public Employee(String name){           this.name = name;      }  public String getName(){         return name;      } }  public class Manager extends Employee{       public Manager(String name){          System.out.println(getName());      } }  执行语句new Manager(“smith”)后程序的输出是哪项?() 
A.  smith
B.  null
C.  编译错误
D.  name

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

[单项选择] As a Company employee you are the desktop administrator of a Windows 2000 Professional computer.  The Windows 2000 Professional computer has 25 MB of free disk space drive C and 800 MB of free disks pace on drive E. You are unable to print large documents because if inadequate disk space on drive C.  You want to be able to use the space on drive E to print large documents. What should you do? ()
A.  From the Printer Properties dialog box, change the location field to  E:/Winnt/System32/Spool/Printers
B.  From the Print Server Properties dialog box, change the location of the spool folder to any   existing file path on drive E
C.  Copy the C:/Winnt/System32/Spool/Printers folder to the E:/Winnt/System32/Spool/Printers  folder
D.  Mount drive C as a subdirectory on drive E
[单项选择] A new employee needs access to a SQL Server 2005 database that is located on a server named SQL1. You create a login named ajones by using the following Transact-SQL statement. CREATE LOGIN ajones WITH PASSWORD = ’SQLServer$1’ The new employee reports that when he logs in, he receives the following error message: "Login failed. The user is not associated with a trusted SQL Server connection." You need to resolve the error and allow the new employee to gain access to SQL1. What should you do?()
A. Change the SQL Server security mode from Windows Authentication mode to SQL Server and Windows authentication mode.
B. Change the SQL Server security mode from SQL Server and Windows Authentication mode to Windows authentication mode.
C. Ensure that the login name is created with square brackets ([]).
D. Give the login access to a specific database by using the CREATE USER Transact-SQL statement.
[单项选择] 1. public class Employee {  2. String name;  3. double baseSalary;  4. Employee(String name, double baseSalary) {  5. this.name = name;  6. this.baseSalary = baseSalary;  7. }  8. }  And:  1. public class Salesperson extends Employee { 2. double commission;  3. public Salesperson(String name, double baseSalary,  4. double commission) {  5. // insert code here  6. } 7. }  Which code, inserted at line 7, completes the Salesperson constructor?() 
A.  this.commission = commission;
B.  superb(); commission = commission;
C.  this.commission = commission; superb();
D.  super(name, baseSalary); this.commission = commission;
E.  super(); this.commission = commission;
F.  this.commission = commission; super(name, baseSalary);
[单项选择] public class Employee{       private String name;  public Employee(String name){           this.name = name;      }  public String getName(){         return name;      } }  public class Manager extends Employee{       private String department;  public Manager(String name,String department){          this.department = department;          super(name);  System.out.println(getName());      }  }  执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?() 
A.  smith
B.  null
C.  SALES
D.  编译错误
[单项选择] public class Employee{   private String name;   public Employee(String name){   this.name = name;  }   public String getName(){   return name;  }  }   public class Manager extends Employee{   public Manager(String name){   System.out.println(getName());  }  }   执行语句new Manager(“smith”)后程序的输出是哪项?() 
A.  smith
B.  null
C.  编译错误
D.  name
[单项选择] You want to access employee details contained in flat files as part of the EMPLOYEE table. You plan to add anew column to the EMPLOYEE table to achieve this.  Which data type would you use for the new column()
A. CLOB
B. BLOB
C. BFILE
D. LONG RAW
[单项选择] 20. public float getSalary(Employee e) {  21. assert validEmployee(e);  22. float sal = lookupSalary(e);  23. assert (sal>0);  24. return sal;  25. }  26. private int getAge(Employee e) {  27. assert validEmployee(e);  28. int age = lookupAge(e);  29. assert (age>0);  30. return age;  31. }  Which line is a violation of appropriate use of the assertion mechanism?()  
A.  line 21
B.  line 23
C.  line 27
D.  line 29
[多项选择]                         下列解释正确的是()
A. out_applet.java中一定有一个参数是“display_string” 
B. 具有两个属性“name”和“value” 
C. value是参数的名称 
D. “good morning”通过 标记传递给“Our_Applet.class”
[简答题] 一般程序如下:                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;
[单项选择] 现有:     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(){  System.out.print(4);    }  public Dog(String name){        this();  System.out.print(3);    } }  执行new Dog(“棕熊”);后程序输出是哪项?()  
A.  143
B.  423
C.  243
D.  1134

我来回答:

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

订单号:

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