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

How to sort an array from smallest to largest java?

528


Is string a wrapper class?

500


How do you compare values in java?

531


what is thread? What are the high-level thread states? Or what are the states associated in the thread? : Java thread

482


Why lambda expression is used in java?

556






What is skeleton and stub?

579


What is the relationship between clipping and repainting under awt?

596


What is polymorphism and what are the types of it?

486


What is the difference between yielding and sleeping?

544


How many days will it take to learn java?

503


What are user defined exceptions?

573


What are the 6 boolean operators?

538


What are different access specifiers in java? Explain

612


What is a percentage sign called?

606


What are methods of a class?

529