Java Telephonic interview experience with Virtusa-Polaris,hyderabad August20, 2016


Himanshu Chaudhary from TAG-Intellect Resource consultancy has scheduled the telephonic interview with Virtusa-Polaris on August 20,2016 at 9:30 AM. I got call from Virtusa-Polaris HR person at 9:38 AM and he asked me to hold online meanwhile he connected to the concern technical deportment and after introducing each other he(His name is Ravi) asked me to rate on java, Jsp, Servlets, Multithreading and spring.The interview as follows…. 1.Tell me about your current project. 2.What is spring. 3.Compare Spring with any other framwork(I compared with struts) [AdToAppearInPost] [sg_popup id=1] 4.what is dependency injection. 5.Types of dependency injection. 6.Purpose of @Autowire and types of @Autowire. 7.What is demon thread. 8.Explain <? extends C> and <? super C> from generics. 9.Program Class A{ public String sample(int a, String str){ return “basha”+a+str; } } Class B extends A{ public String sample(double d,String str){ return “basha”+d+str; } public static void main(String args[]){ A a=new B(); a.sample(1.4,”basha”); a.sample(2,”basha”); } } Questions: a.what is the output? b.what is the concept behind it? c.what is static binding and dynamic binding? d.Which binding this program is following? 10. Program: Class A{ public static void main(String args[]){ TreeSet<String> ts=new TreeSet<String>(); ts.add(null); System.out.println(“the treeset:::”+ts); } } Questions: a. Is this program runs without any exception? b. In which version of this program runs without Exception. 11. Assume there is class call Emplayee with member variables empID of type int and empName of type String. Then created two object for employee class as follows. Class Employee{ private int empId ; Private String empName: Employee(int empId,String empName){ this.empId=empId; this.empName=empName; } Public static void main(String args[]){ Employee e1 = new Employee(1,”basha”); Employee e2 = new Employee(1,”basha”); System.out.println(“question 1:”+ e1==e2); System.out.println(“question 2:”+ e1.equals(e2)); System.out.println(“question 3:”+ e1.hashcode()+” ,”+e2.hashcode()); } } Questions: a. Explain each line of output. b. If i want to the output of “question 2” as true, what is need to do? c. What is hashcode()? d. If i need to put objects of Employee into Map what all changes i need to do? e. What is the contract between .equals() and hashCode()? 12. What is is-a relation ship and has-a relation ship.    
Help your friend by sharing
www.000webhost.com