CoreJava Questions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

CoreJava Questions

1. Explain OOP’s concepts


2. Difference Between Overloading and Overriding.
3. Explain encapsulation. Where you have used in your project.
4. What is method hiding.
5. Can we override static methods?
6. What is Abstraction.
7. How to create singleton class.
8. How can we create immutable classes.
9. Difference between final,finally,finalize.
10.Can you explain singleton class with an example.
11.What is interface.
12.Difference between interface and abstract class.
13.Why interface variable by default public,static,final
14.Difference between the String , StringBuffer and StringBuiledr.
15.Difference between the == and equal().
16.Can you tell me the Object class methods.
17.How many ways we can create Thread.
18.Can we start thread once again.
19.Tell me the thread class constructors.
20.Yield(),join(),sleep().
21.Difference between the notify() and notifyAll().
22.Synchronized method.
23.Difference between the synchronized() and synchronized block.
24.If we declare method as private, so is it possible to override that method.
25.Difference between the t.start() and t.run().
26.What happened we don’t override run() in thread class.
27.Can we overload run() or not. If yes what happened.
28.What is exception.
29.Difference between exception and error.
30.What is checked and un-checked exception.
31.Class not found exception will come under which exception.
32.File not found exception will come under which exception.
33.What is the super class for all exceptions.
34.How can we create user defined exception.
35.How to handle exceptions in your project.
36.Can we write try with out catch or finally block.
37.How many methods is their to print exception.
38.What is the difference between collection and collection framework.
39.What is the difference between collection and map.
40.Difference between List and Set.
41.Difference between ArrayList and LinkedList.
42.What are the legacy classes in collections.
43.How can we create synchronized version of arraylist.
44.What is enumeration.
45.What is iterator.
46.What is ListIterator.
47.Difference between the iterator and ListIterator.
48.How many cursors are in collections.?
49.What is map
50.Difference between hash map and hash table.
51.Difference between comparable and comparator.

JDBC

1. What is JDBC.
2. How many interfaces in JDBC.
3. What is the difference between statement and prepared statement.
4. JDBC2.0 features.
5. JDBC 3.0 features.
6. Difference between ResultSet and RowSet.
7. Explain Connection pooling
8. What is the difference between pool and cache .
9. What is the difference between DriverManager and DataSource.

SERVLET

1. What is servlet.
2. How many ways we can crete servlet
3. Difference between GenericServlet and HttpServlet.
4. What is servlet config.
5. What is servlet contex.
6. Difference between servlet cofig and servlet context.
7. What is session tracking.
8. How many way’s we can create session tracking.
9. What is the difference between forward and sendRedirect mechanism .
10.What is cookie.
11.What is the difference between cookie and session.
12.How to create cookie.
13.How many types of cookies is their.
14.How to set session time out.
15.Difference between doGet() and doPost().
16.Why HttpServlet class given as abstract.

JSP

1. What is JSP.
2. How many phases in JSP.
3. Difference between servlet and jsp.
4. What is declarative tag in jsp.
5. How handle exceptions in jsp.
6. How many implicit objects in jsp.
7. Difference between include directive and include action.
8. How many page attributes in jsp.
9. How to create custom tags in jsp.
10.What is JSTL.
11.How many types of tag libs in JSTL.

STRUTS

1. Explain struts flow.


2. How many types of form beans in struts.
3. What is Action Class in servlet.
4. Difference between ActionForm and DynaActionForm.
5. Why we use Validator Form
6. What is the difference between validator form and Dyna validator form.
7. What is the difference between Dispatch Action and LookUpDispatch
Action.
8. What is switch action when we use this.
9. What is the difference between struts1.x and 2.x.
10.What is the use of interceptor.
11.How many interceptor are available in struts.
12.Explain struts configuration file.
13.How to configure struts configuration file in deployment file.
14.How to configure validator frame work in struts configuration file.

Hibernate

1. What is hibernate.
2. Why we use hibernate.
3. What is the difference between JDBC and Hibernate.
4. Explain hibernate configuration file.
5. How many types of generators are available in hibernate.
6. What is table per class.
7. What is table per sub class .
8. What is table per concrete class .
9. What is HQL.
10.What is the difference between HQL and CreteriaAPI.
11.Why in nativeSQL.
12.What is entity query.
13.What is scalar query.
14.What is named query.
15.Relation ships(one-to-many, many-to-one, many-to-many).

SPRING

1. What is spring.
2. What is spring IOC.
3. What is Dependency look up.
4. What is dependency injection.
5. How many types of dependency injections are their in spring.
6. Bean scopes.
7. Bean auto-wiring.
8. Difference between setter injection and constructor injection.
9. How many types of bean factory’s in spring
10. Where you used spring in your project.

You might also like