Thread: All Interview Question
Joined: 20 Apr, 2017
All Interview Question
1.if u have mentioned java7 in ur project then u should know the new features of jdk 7
2. String str=?abc?-------------------1 String str2=new String(?abc?)--------------2 In above two case how many object will be created and how they are stored(string pooling)
3. public void hello(String abc) public void hello(Integer it) if we call hello(null) which method will be called and why?
4.write a own exception class.
5.what is enum. Write one enum
6.can we write enum within a class?
7.List vs Set
8.if u have given list
9.if two objects are there suppose obj1 and obj2. Hashcode of both the object is same but if we call .equals() then that will return false(obj1.equals(obj2)-it will return false).if we have a Map and we are putting these two object as key then they will be replaced or both of them will be added.(Ans->it will add). Explain by making internal flow
10.Internal of Map
11.write one thread to print 1 to 1000
12. write two thread from which one will print only even number and another will print odd number.but the requirement is output should be 1 2 3 4 5 6?.like this
13.what is the use of notify.give an example how u will notify one waiting thread
14.if there is one array which contains 1 to 100 but not in sequentially.there is no element missing from1 to 100 and there is no duplicate also. So how can u directly pickup value 50 or 70 or any given number( array will be like this 22-12-9-34-89-?.-7-4)
15.Tell me about JVM memory management.
16.how can you increase the size of the jvm.
17.There is one Employee class which has Id and Name. Write the code for equals() and hashcode() so that if two employee has same Id the object will be same.
18.Write Fibonacci series program.
19.Given string will be like ?1121321-Airtel#121331-Airtel#122143_idea#3412412-Bsnl#4634234-Idea#..........? WAP to generate a Map
20.WAP to reverse each word in a string without using string function(only charAt() u can use) Input=?This is a nice place? Output=sihT si a ecin ecalp?
21.There is List of Employee. Employee has id and name. So sort that list in descending order of id of the employee.
22.What is the use of finalize(). Give one scenario where we can use this.
23.What is Encapsulation. Why encapsulation.
24.What is data abstraction.
25.What is difference between Colleactions.syncronizedMap() and cuncurrentHashMap
27.Difference between Checked exception and Unchecked exception.
28.Implicit object of JSP
29.Servlet Life cycle methods.
30.Which JSP taglibs u used in your project.
1.write one criteria to get Employee of id 2 from employee table
2.what is the use of projection
3.write one unidirectional mapping(both annotation and xml)
4.write oneToOne and many to many mapping
5.why we are using @JoinColumn. what are the parameters we can use with @OneToMany(?)
6.supose there are 50000 record are there .how u can save to the database
7.what is the diff between flush() and commit()
8.if we have used 2nd level cache and there are 5 sessions opened. If I commit from one session that session data will be removed from 2nd level cache or not.
9.if we are using 2nd level cache then how the database hit will done(means suppose I retrieve one object for the first time then how the data will be retrieved and if the data is already there in 2nd level then how the data will be retrieved)
10.Tell me about different states of object.
11.They give me one scenario and ask to write all the classes and design the table and associate one table to another .
11. Supose 2 HR trying to update same employee at a time. And one of them update last name and Another update mobile number. So how can u store both update.(He told me have u ever used Hibernate Versioning.)
1.Inject one list
2.why we are using Spring
3.beans scope. What is singleton. Which class should be made as singletone
4.Tell me about Bean factory internal.
5.Bean Life lifecycle.
9.What is AOP. Why u are using AOP in your project.
10.What is Join Point and pointcut.
11.Draw and describe the flow of spring MVC
12.If there are multiple Handler
Post has been marked as Answered
Post has been marked as Un-Answered
Do you want to Report as spam?
Report a thread
Successfully marked as spam.
Tell A Friend
Successfully send the mail to Friends!!
Successfully you refer to your Friends for this Thread