Monday, April 6, 2009

Servlets And JSP IQ

1. What are Servlets?
2. What are advantages of servlets over CGI?
3. Can you explain Servlet life cycle?
4. What are the two important API’s in for Servlets?
5. Can you explain in detail “javax.servlet” package?
6. What’s the use of ServletContext?
7. How do we define an application level scope for servlet?
8. What's the difference between GenericServlet and HttpServlet?
9. Can you explain in detail javax.servlet.http package?
10. What’s the architecture of a Servlet package?
11. Why is HTTP protocol called as a stateless protocol?
12. What are the different ways we can maintain state between requests?
13. What is URL rewriting?
14. What are cookies?
15. What are sessions in Servlets?
16. What’s the difference between getSession(true) and getSession(false) ?
17. What’s the difference between “doPost” and “doGet” methods?
18. Which are the different ways you can communicate between servlets?
19. What is functionality of “RequestDispatcher” object?
20. How do we share data using “getServletContext ()”?
21. Explain the concept of SSI?
22. What are filters in JAVA?
23. Can you explain in short how do you go about implementing filters using Apache Tomcat?
24. Twist: - Explain step by step of how to implement filters?
25. what’s the difference between Authentication and authorization?
26. Explain in brief the directory structure of a web application?
27. Can you explain JSP page life cycle?
28. What is EL?
29. how does EL search for an attribute?
30. What are the implicit EL objects in JSP?
31. How can we disable EL?
32. what is JSTL?
33. Can you explain in short what the different types of JSTL tags are?
34. How can we use beans in JSP?
35. What is tag for ?
36. What are JSP directives?
37. what are Page directives?
38. what are include directives?
39. Can you explain taglib directives?
40. How does JSP engines instantiate tag handler classes instances?
41. what’s the difference between JavaBeans and taglib directives?
42 what are the different scopes an object can have in a JSP page?
43. what are different implicit objects of JSP?
44. what are different Authentication Options available in servlets?
45. Can you explain how do we practically implement security on a resource?
46. How do we practically implement form based authentication?
47. How do we authenticate using JDBC?
48. Can you explain JDBCRealm?
49. Can you explain how do you configure JNDIRealm?
50. How did you implement caching in JSP?


1. How does JAVA interact with databases?
2. Can we interact with non-relational sources using JDBC?
3. Can you explain in depth the different sections in JDBC?
4. Can you explain in short how you go about using JDBC API in code?
5. How do you handle SQL exceptions?
6. If there is more than one exception in SQLException” class how to go about displaying
7. Explain Type1, Type2, Type3 and Type4 drivers in JDBC?
8. What are the advantages and disadvantages of using JDBC-ODBC bridge driver?
9. What are the advantages and disadvantages of using Native-API/ Partially Java Driver?
10.What are the advantages and disadvantages of using Net-Protocol/ All-Java driver?
11. What are the advantages and disadvantages of using Native-protocol/ All-Java driver?
12. Define meta-data?
13. What is DatabaseMetaData?
14. Can you explain “ConnectionFactory” class?
15. I want to display tables of a database how do I do it?
16. Define “ResultSetMetaData”?
17. What is the difference between “ResultSet” and “RowSet”?
18. Can “ResultSet” objects be serialized?
19. Can you explain “ResultSet”, “RowSet”, “CachedRowset”, “JdbcRowset” and
“WebRowSet” relation ship?
20. what are the different types of resultset?
21. Explain the concept of “PreparedStatement “statement interface?
22. What’s the difference between “Statement” and “PreparedStatement”?
23. How can we call stored procedure using JDBC?
24. Can you explain “CallableStatement” interface in detail?
25. How do you get a resultset object from stored procedure?
26. How can we do batch updates using “CallableStatement” Interface?
27. Define transactions?
28. what is ACID in transaction?
29. what are the four essential properties of a transaction?
30. Explain concurrency and locking?
31. What are different types of locks?
32. What are the different types of levels of resource on which locks can be placed?
33. Define lock escalation?
34. What is Table level and Row level locking?
35. What are the problems that can occur if you do not implement locking properly?
36. What are different transaction levels?
37. Twist: - what are different types of locks?
38. What is difference between optimistic and pessimistic locking?
39. What are deadlocks?
40. How can we set transaction level through JDBC API?
41. Can you explain transaction control in JDBC?
42. What are Savepoints in a transaction?

IQ On Threading

1. What’s difference between thread and process?
2. What is thread safety and synchronization?
3. What is semaphore?
4. What are monitors?
5. What’s the importance of synchronized blocks?
6. How do we create threads?
7. what’s the difference in using runnable and extends in threads?
8. Can you explain Thread.sleep?
9. How to stop a thread?
10. What is wait() and notify() ?
11. Can you explain how Scheduling and Priority works in threads?
12. Can you explain Yielding in threading?
13. what are daemon threads?

Core Java Q

1. What is JVM (Java Virtual Machine)?
2. What is JIT (Just-in-Time) Compilation?
3. What is Object Oriented Programming?
4. What’s a Class?
5. What’s an Object?
6. What’s the relation between Classes and Objects?
7. What are different properties provided by Object-oriented systems?
8. How do you implement inheritance in Java?
9. How can we implement polymorphism in Java?
10.What’s an interface and how will you go about implementing an interface?
11. What is an Abstract class?
12. What are Abstract methods?
13. What’s the difference between “Abstract” classes and “Interfaces”?
14. What’s difference between Static and Non-Static fields of a class?
15. What are inner classes and what’s the practical implementation of inner classes?
16. What are packages?
17. What is a constructor in class?
18. Can constructors be parameterized?
19. Can you explain transient and volatile modifiers?
20. What is the use if “instanceof ” keyword?
21. What are Native methods in Java?
22. Explain in depth Garbage collector?
23. How does the garbage collector determine that the object has to be marked for deletion?

24. Can you explain “finalize()” method?
25. How can we force the garbage collector to run?
26. What’s the main difference between “Switch” and “If ” comparison?
27. What’s the use of JAVAP tool?
28. What are applets?
29. In which package is the applet class located?
30. What are native interfaces in Java?
31. what are Class loader’s?
32. what is Bootstrap, Extension and System Class loader?
33. Can you explain the flow between bootstrap, extension and system class loader?
34. Can you explain how can you practically do dynamic loading?
35. How can you copy one array in to a different array?
36. Can you explain the core collection interfaces?
37. Can you explain in brief the collection classes which implement the collection interfaces?
38. What’s the difference between standard JAVA array and ArrayList class?
39. What’s the use of “ensureCapacity” in ArrayList class?
40. How can we obtain an array from an ArrayList class?
41. What is “LinkedList” class for?
42. Can you explain HashSet class in collections?
43. what is LinkedHashSet class?
44. what is a TreeSet class?
45. what’s the use of Comparator Interface?
46. How can we access elements of a collection?
47. What is Map and SortedMap Interface?
48. Have you used any collection algorithm?

49. Can we create our own exception class?
50. What are chained exceptions?
51. What is serialization?
52. How do we implement serialization actually?
53. What’s the use of Externalizable Interface?