How will you create the class for the following scenario?
Employees under one employee?
Answers were Sorted based on User's Feedback
Answer / jagdish
class Employee {
Integer empCode;
String firstName;
String lastName;
List<Employee> subEmployees;
}
| Is This Answer Correct ? | 4 Yes | 1 No |
What is the covariant return type?
is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in main() likw this "static void main(String [] s) then what it signifies?
What is final access modifier in java?
IN java collections we have both interfaces and classes. instead of using interfaces why we can't use classes only like that why we can't use interfaces only. why we need two things interface and class.
What is visibility mode?
What are order of precedence and associativity, and how are they used?
What is the purpose of declaring a variable as final?
Which are thin and thicK wrapper Class's in Java?
Explain about varargs in java?
What is a singleton class in Java? And How to implement a singleton class?
what is overloading in java?
13 Answers Ascent, DNS, Infosys, SDA, VelTech,
State some advantages of java?