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 do you square a number in java?

558


What is mean by encoding?

627


How are multiple inheritances done in Java?

622


How much ram can a 64 bit processor theoretically?

468


What is the final blank variable?

591






Why java is object oriented?

592


Does apple use java?

497


How is Object Oriented Programming different from Procedure Oriented Programming?

595


why using interface interface ?

1512


What is the purpose of the strictfp keyword?

610


Is a class subclass of itself?

605


Can a class declared as private be accessed outside it’s package?

514


What is module with example?

516


What is a modifier?

874


What are meta-annotations?

553