存在Employee类,如何创建一个长度为3的Employee类型数组?()
A: Employee[3]e;
B: Employee[]e=newEmployee[3];
C: Employeee[3];
D: Employee[3]e=newEmployee[];
A: Employee[3]e;
B: Employee[]e=newEmployee[3];
C: Employeee[3];
D: Employee[3]e=newEmployee[];
举一反三
- 有如下类的定义,创建Employee对象正确的是() public class Employee{ private int age; private String name; public void Employee(){ } public Employee(int age){ this.age = age; } public Employee(String name){ this.name = name; } } A: Employee e = new Employee( ) B: Employee e = new Employee(10); C: Employee e = new Employee(tom); D: Employee e = new Employee(10,"tom");
- 有如下类的定义,创建Employee对象错误的是() public class Employee{ private int age; private String name; public Employee(int age){ this.age = age; } public Employee(String name){ this.name = name; } public Employee(int age,String name){ this(age); this.name = name; } } A: Employee emp = new Employee(10); B: Employee emp = new Employee("Tom"); C: Employee emp = new Employee(); D: Employee emp = new Employee(10,"Tom");
- 阅读以下程序,说明Company类和Employee类是 关系。public class Company{ private Employee employee; public Employee getEmployee(){ return employee; } public void setEmployee(Employee employee){ this.employee=employee; } //公司运作 public void run(){ employee.startWorking(); } }
- They are Mr. Jackson's ______. A: employees B: employee C: a employee D: an employee
- Ahigh-highleaderintheOhioStatestudiesachievedthehighestratingswithrespectto________. A: both employee performance and satisfaction B: employee performance only C: employee satisfaction only D: employee performance for routine tasks only