ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
How will you create the class for the following  scenario?

Employees under one employee?

 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How will you create the class for the following scenario? Employees under one employee?
Answer
# 1
Employee class

SubEmployee extends Employee
 
Is This Answer Correct ?    2 Yes 1 No
Satya
 
  Re: How will you create the class for the following scenario? Employees under one employee?
Answer
# 2
class Employee {
  Integer empCode;
  String firstName;
  String lastName;
  List<Employee> subEmployees;
}
 
Is This Answer Correct ?    4 Yes 1 No
Jagdish
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Explain Global variables in Packages?  2
Differentiate Vector and ArrayList? Wipro4
watz the difference between abstract class and interface? Which one u ill choose as a designer? Sonata1
Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang> Symphony6
transaction attributes ?  2
real time example for deadlock,starvation,livelock  4
How to initialize an Applet ? TCS6
Which of these methods belong to Thread & Object class? join, yield, sleep, wait, notify Ericsson2
what is difference between perfom() & excute() ? IBM2
How to find the size of an array a)array.length() b)array.length c)array.size() d)array.size Accenture6
How can you sort dates? TCS1
when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).  2
What are the names of interfaces that doesn't consists of method/s ?  3
Name the runtime exceptions that occurs frequently?  4
In Java why we write public static void main(String args[]) why not main()? TCS12
What is persistence ?  2
What is meant by final class, methods and variables?  2
What are inner and anonymous class?  2
what is marker interface ? what is the necessity of it? Accenture4
What is the need to implement Serializable interface (with no methods) for objects which are to be serialized ? We can write our own functionality which writes objects to streams then why we need to implement and tell JVM that which objects can be serialized. iFlex4
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com