Jun
10
2016

Most important java/JEE interview question and concept

In this post of java tutorial we will see some of most important java interview question. These questions are asked most frequently. Although question may vary depending on the interviewer , experience level and job profile but these are some basic question that you may face.  These questions are mixed from core java, java concept, collection String, jsp, servlet , hibernate, spring, sql , database and web technologies. If you have applied for java developer then most of question start with OOPs concept. Then based on your response they interview proceed.

  • What are OOPs concept.
  • What is abstraction.
  • What is encapsulation.
  • What is Difference in encapsulation and abstraction.
  • What is polymorphism.
  • What is inheritance.
  • Difference in jsp and servlet.
  • Why tomcat does not require restart when there is any change in jsp file.
  • What is code written in jsp compiled servlet file.
  • What is the use of wrapper classes in java.
  • Difference in set and list.
  • Can we call destroy method explicitly in servlet.
  • Primitive values cannot be stored in a collection directly. Why ?
  • What if parent class of a serialized class not serialized. In this case parent class fields would be serialized or not.
  • What if child class of a serialized class not serialized. In this case child class fields would be serialized or not.
  • Why we mostly use primary key to retrieve record even we can retrieve record with unique also.
  • Difference in unique key and primary key.
  • What is concurrentHashMap. In which situation you will use concurrentHashMap.
  • Difference in hashtable and hashmap.
  • Difference in truncate and delete.
  • Difference in truncate and drop.
  • Difference in wait() and join() methods.(Sapn Infotech)
  • What is web.xml. (Sapn Infotech)
  • What is application context. (Sapn Infotech)
  • What is serialization and externalization. (Sapn Infotech)
  • Does collection store actual object or reference.
  • Why collection does not store actual object.
  • Difference in delete and drop.
  • What is transaction.
  • How to read file in java. Which classes are used. Write a small program.
  • What is acid property.
  • How to maintain session in spring mvc.
  • Session is class or interface.
  • How many ways are there to maintain user state.
  • Difference in Cookie and session.
  • Boolean.TRUE or true which one is better.
  • Difference in having and where.
  • What is caching in hibernate.
  • What is benefits of query caching.
  • What is Named query. why it is useful.
  • Benefits of hibernate over jdbc.
  • What is Named query. why it is useful.
  • Benefits of hibernate over jdbc.
  • Why String is immutable in java.
  • How we can configure thread session in hibernate.
  • What are proxy class in hibernate.
  • What is difference in get and post post method.
  • How servlet works.Servlet request flow. Complete flow from starting of client request till the response returned to client.
  • Difference between list and set.
  • Difference in DDL and DML.
  • What is sorted set and treeSet.
  • Internal working of hashMap.
  • Lifecycle of spring bean.
  • Servlet life cycle.
  • What is marker interface.(FIS- compatibility with certain operations).
  • Feature added in java5 and java7 and java 8(FIS).
  • select 1 from table limit 10. What will be result.(FIS).
  • Select * from table1,table2 . What will be result.(FIS).
  • How to get Metadata about table result returned and about database.(FIS).
  • Clone method implementation. What are different type of cloning is possible.(FIS).
  • What is double check locking in singleton design pattern.
  • What is benefits of spring framework in details.
  • What is benefits of hibernate over JDBC.
  • What is difference in object level synchronization and class level synchronization.
  • Benefits of Encapsulation.
  • How we can break encapsulation.
  • Can we access parent class method after overriding it in subclass.
  • Difference in String buffer and StringBuilder.
  • What is hashing. How Hashmap work internally based on hashing concept.
  • What is IOC in spring.
  • Explain Inversion of control is design pattern.
  • Which hibernate api you have used.
  • All the task you have done in project till now.
  • When will you choose interface and when will you choose abstract class.
  • what is servlet. How many ways we can create servlet.
  • What is difference between extending genericservlet and extending httpservlet.
  • Why don’t we create servlet by implementing servlet interfaces instead of extending httpservlet.
  • What StringBuffer and stringBuilder differences.
  • When to use StringBuffer and when to use stringBuilder.
  • servlet life cycle.(Adobe Chandigarh Drive 17 January).
  • If we create constructor then init will be called first or constructor will be called first.(Adobe Chandigarh Drive 17 January).
  • How we create servlet. (Adobe Chandigarh Drive 17 January).
  • What is Thread Executor framework.(Adobe Chandigarh Drive 17 January).
  • how to synchronize list , map.(Adobe Chandigarh Drive 17 January).
  • What are synchronized methods and synchronized statements?
  • Difference in Hashmap , hashtable and concurrentHashMap.
  • Can a thread go in runnable state twice. i.e if a thread is in running state can it go in rubbable state again.
    String is class or data type ?
  • Why char array is better than string to store password.

About the Author: devender kumar

java/j2EE developer

Comments are closed.