How will you create the class for the following scenario?

Employees under one employee?

Answer Posted / jagdish

class Employee {
Integer empCode;
String firstName;
String lastName;
List<Employee> subEmployees;
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need array in java?

540


What is the purpose of declaring a variable as final?

492


Why do we need strings in java?

530


What is a static class in java?

562


What is quick sort in java?

561






What does java se mean?

595


Explain java heap space and garbage collection?

592


What is meant by method overriding?

549


Why string is not thread safe?

545


What is a Presistent Object?

647


What is java’s garbage collected heap?

542


Which class cannot be a subclass in java?

549


What is the purpose of skeleton and stub?

591


Can we write a class without main method in java?

487


What are methods of a class?

544