How will you create the class for the following scenario?

Employees under one employee?

Answers were Sorted based on User's Feedback



How will you create the class for the following scenario? Employees under one employee? ..

Answer / satya

Employee class

SubEmployee extends Employee

Is This Answer Correct ?    6 Yes 1 No

How will you create the class for the following scenario? Employees under one employee? ..

Answer / jagdish

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

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Core Java Interview Questions

Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

1 Answers  


What is string builder in java?

1 Answers  


How to make a class immutable?

15 Answers   Bosch, TSYS,


JVM is platform independent or depeneded?

7 Answers  


Can I learn java in 3 months?

1 Answers  


What does the three dot emoji mean?

1 Answers  


What does the “final” keyword mean in front of a variable? A method? A class?

1 Answers  


How many arguments can be passed to main ()?

1 Answers  


What is the vector class in java programming?

1 Answers  


What is class variable java?

1 Answers  


What is the difference between numeric and integer?

1 Answers  


What class is used to implement a Throwable array?

3 Answers  


Categories