100 java interview questions
Hi everyone, in this blogpost, I am specifying 100 interview questions which are commonly asked during a java developer interview. It includes questions about core java, j2ee, struts, servlets, jsp, hibernate, spring and database.
The questions are as follows:
The questions are as follows:
- Difference between method overloading and method overriding.
- Different types of Annotations used.
- Explain about lists and sets. What are there differences ?
- Difference between super() keyword and this() keyword ?
- Difference between abstract class and interface. When are they preferred ?
- Static and dynamic binding in java?
- What is synchronization in java? What is synchronized method ?
- Difference between serializable and externalizable interface in java.
- What is abstraction ? What is polymorphism? What is runtime and compile time polymorphism ?
- What is generics in java ?
- What are abstract class and abstract method ?
- What is marker interface ? Examples of marker interface ?
- What is static method, static block and static class ?
- What is Final method, final class and final variable in Java ?
- What is finalize in java?
- Garbage collection in java.
- What is daemon thread.
- Different types of errors in java.
- Difference between error and exception.
- Difference between StringBuffer and StringBuilder.
- What is multithreading ?
- Difference between Comparator and Comparable interface.
- What is encapsulation and what are there different scopes.
- What is join in database.
- Difference between drop, truncate and delete table.
- What is trigger in database.
- What is Cursor in database.
- Steps in connecting with database using jdbc.
- What are the different drivers of jdbc.
- What are jstl tag libraries ?
- How to pass values from jsp to server and from server to jsp ?
- Different scope values of jsp:usebean ?
- What are implicit objects in jsp ?
- How jsp communicate with java file ?
- Life cycle of jsp.
- Expression, declaration and scriptlet in jsp
- Difference between foreward and sendRedirect.
- Difference between jsp: forward and page:forward.
- What happens when a button is clicked in jsp page.
- Difference between doGet() and doPost(). What are the parameters of doGet() ?
- Life cycle of Servlet.
- What is Servlet Context(). Difference between ServletContext() and ServletConfig() ?
- What is pre initialization of Servlet ?
- How to create deadlock in Servlet ?
- How to get information of one servlet in another.
- What are Servlet error codes ?
- What is struts framework ? Importance of Struts framework.
- Important classes in struts framework.
- What is ActionServlet ?
- What is ActionClass ?
- What is ActionForm?
- How to handle exceptions in Struts ?
- Explain the flow of control in Struts ?
- How to map objects in Struts ?
- How does action class is invoked in Struts and who invokes it ? How is it different in Spring ?
- Difference between dispatchAction and lookupDispatchAction in Struts ?
- Configuration files used in Struts ?
- What is JSF ? How JSF is different from JSP ?
- What are the advantages of JSF ?
- What are navigation rules in JSF ?
- How struts is different from JSF ?
- Difference between managed bean and navigation bean. ?
- Life cycle of JSF.
- What are the main tags in JSF.
- What is Spring framework ? Advantages of Spring framework ?
- What is point cut and join point in Spring ?
- Difference between bean factory and Application context in Spring ?
- What is XML bean factory ?
- What is Aspect Oriented programming ?
- What is Aspect ?
- What is Advice ? What are the different types of advice?
- How to configure spring in web application.
- How to integrate hibernate with spring.
- How to integrate JSF with Spring ? What is delegation variable resolver ?
- Bean initialization in Spring.
- Bean destruction in Spring.
- Different attributes of Spring bean.
- What are the different types of AutoWiring ?
- How to integrate Spring with Struts.
- 7 building blocks of Spring.
- What is different in Spring 2.5 than its previous versions.
- Configuration files used in Spring and hibernate ?
- What is around advice ?
- What are different scopes of spring ?
- What is lazy initialized bean ?
- Explain spring mvc framework.
- What is dependency injection. Explain the types of dependency injection.
- What is hibernate ? Advantages of hibernate.
- What is second level cache in hibernate.
- Query Cache in hibernate.
- Difference between get and load in hibernate.
- What is named SQL Query in hibernate.
- Difference between sorted and ordered collection in hibernate.
- What is session in hibernate.
- Difference between save, persist and saveOrUpdate methods in hibernate.
- What is SessionFactory in hibernate ?
- Difference between get and load in hibernate ?
- What is N+1 problem and how to avoid this.
- What is lazy initialization exception.
- What is singleton pattern ? How to implement singleton pattern.
These are some of the most important interview questions in Java. I am sure if you know the answers of all these questions, it is very easy to crack an interview. But I recommend to learn some more questions from other sources.
Please comment below if you have any doubts/suggestions. All comments would be responded soon.
Thank you for reading the post !!!
Comments
Post a Comment