Interview questions

JAVA interview questions – page 9

2,804 questions. Tap “Show answer” to check yourself.

  1. How can we refresh the servlet for every 2 minutes automatically?

  2. Why do I have to reaccess the database for Array, Blob, and Clob data?

  3. What happens if we execute the program?class Return{int display(){try{return 1;}finally{return 2;}}public static void main(String args[]){Return r=new Return();r.display();}}

  4. How do I include static files within a JSP page?

  5. How do I start debugging problems related to the JDBC API?

  6. What is the disadvantage of threads?

  7. How do I prevent the output of my JSP or Servlet pages from being cached by the browser?

  8. How do you prevent the Creation of a Session in a JSP Page and why?

  9. If I use the JDBC API, do I have to use ODBC underneath?

  10. How do I check in my code whether a maximum limit of database connections have been reached?

  11. What causes the "No suitable driver" error?

  12. If my session bean with single method insert record into 2 entity beans, how can I know that the process is done in same transaction (the attributes for these beans are Required)

  13. Does stateless Session bean create() method contain any parameters?

  14. What is the difference between optimistic locking and pessim

  15. How is SAP JCo different from SAP .NET Connector?

  16. What are the licensing terms for using SAP JCo or SAP Java IDoc Class Library?

  17. What is pure servlet?

  18. What is the JDBC syntax for using a literal or variable in a standard Statement?

  19. What is garbage collection? Can it be forced?

  20. How to sort String, for example: abced. to change to abcde ?

  21. How do I use a scriptlet to initialize a newly instantiated bean?

  22. How do I create a database connection?

  23. What is JSP directive ?

  24. What is JSP element ?

  25. Which type of JDBC driver is the fastest one?

  26. What is Anonymous class,Singleton Class and Assertions?

  27. Is there a way to get the original exception object from inside a nested or wrapped Exception (for example an EJBException or RemoteException)

  28. Is a class a subclass of itself?

  29. What driver should I use for scalable Oracle JDBC applications?

  30. How can I tell if my JDBC driver normalizes java.sql.Date and java.sql.Time objects?

Companies that ask JAVA questions