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

Differece between class and generic class?

0 Answers   Tech Mahindra,


Explain cookies?

2 Answers   Canon,


Can you call a constructor within a constructor?

7 Answers  


what is object-oriented programming in java?

0 Answers   Reliance,


How to eliminate duplicates from an array?

6 Answers   ABC, AdMod, Adobe, College School Exams Tests, Patni, Wipro,






what really hapens when a object is created using new operator? 1.is it allocates memory to all variables and methods in the class with reference to that object?

3 Answers  


What is set in java?

0 Answers  


Is java util regex pattern thread safe?

0 Answers  


What are the two parts of a conditional statement?

0 Answers  


How do you make an arraylist empty in java?

0 Answers  


What is a java applet? What is an interface?

0 Answers  


Name the package that most of the AWT events that supports event-delegation model are defined?

2 Answers  


Categories