Interview questions

JAVA interview questions – page 24

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

  1. Suppose there are 15 links on the homepage of a site and each link creates a new request, how your servlet controller would handle it? (Assuming you are using MVC-2)

  2. What are simple rules that a Primary key class has to follow

  3. Types of Servlets?

  4. How to get value from init() method in servlet? orHow to get initializaion time values from init() in servlet

  5. How the server will know (i.e) when it can invoke init, service,destroy methods of servlet life cycle?

  6. What is the super class of All servlets?

  7. What method used to add a jsp to the servlet

  8. What is the class containing all the methods as static?

  9. What is meant by preintialization?

  10. How can a servlet automatically updated by its data without refreshing?take one example of one sensex site. the corresponding data are shown in a scrolling manner. how they can automatically be refreshed after some time. without refreshing the page.

  11. How you can activate or call one another servlet method?

  12. What is the difference between Class.forName and registerDriver()

  13. What is CMR

  14. What is difference between array list and vector.? and which one is most useful.? array list does whatever vector does so why we need the array list?

  15. What are the different types of Synchronization? Is there any other way of method or class or object locking

  16. What is re-entrant. Is session beans reentrant. Is entity beans reentrant

  17. What will happen when we call the destroy method in the init method? will the servlet exist?

  18. How to count how many times aprticular link has been clicked using jsp and javascript

  19. Imagine there is a class Employee. We create an object of EmployeeEmployee a= New Employee();If we are givingSystem.out.println(a);What gets printed?

  20. Why are Java ARchive (JAR) files important?

  21. What is the disadvantage of paint method in Applet

  22. What is the difference between optimistic locking and pessimistic locking

  23. Difference between wait and notify in java

  24. In which conditions we have to use the ServletContext

  25. Isn't it redundant to have to mark the methods final if the class is final?

  26. What is Instance pooling?

  27. Whats the difference between using invalidate() & sessionDestroyed for sessionclosing.

  28. Why we write server side programs? what is its main purpose?

  29. Have you used threads in Servelet

  30. How can we call cmp?

Companies that ask JAVA questions