Interview questions

JAVA interview questions – page 35

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

  1. In struts why we use jsp as presentation layer? can we use servlet as presentation layer?

  2. When many Users are browsing the same application at the same time and they click the "Submit" button will many objects be created for each and every User?

  3. What is the difference between servlet session and jsp session?

  4. What is the actual difference between MVC and MVC Model2

  5. When jsp is compiled into servlet, where the servlet is actually stored(storage location)?

  6. What do mean by polymorphism, inheritance, encapsulation?

  7. What is the difference between java script and java langauge.

  8. What is the diffrence between Apache struts and jakarta struts ?

  9. What is the use of findbyprimarykey()?

  10. What is an abstract method?

  11. Can you write Java code for declaration of multiple inheritance in Java ?

  12. What does < %= obj.getXXX() %> the following expression get evaluated to ?

  13. When to use Interface over abstract class?

  14. What are the objects that are not subject to garbage collection?

  15. What is use of implict Objects?why the container is given those one?

  16. Why is the action class is singleton in nature? Isn't this creates a bottleneck for the requests?

  17. What is the diff. b/w PAGE,APPLICATION and SESSION implicit objects of JSP?

  18. Can we go one page to other page using java script or action Mapping ?

  19. What is the request processor in struts? how it works?

  20. What is the Locale class?

  21. Does Struts provide support for Validator & Tiles by default ?

  22. In one class i stored the key and values in the hashmap.so using key value i have to check wheterthe value for key is correct or not.so howto retreive the key and values in jsp page

  23. Name two subclasses of the TextComponent class?

  24. What is the difference between session and cookie ?

  25. What part of MVC does Struts represent

  26. I want to accomplish the following scenario:1) user submits a jpg/gif file from an html form (using <input type="file"> in the form, the user can browse to a file of their choice)2) upload the jpg/gif file through a combination of Java and JSP's3) put the jpg/gif into a database on a server and/or into a folder on my local system.

  27. I have a String name & Map m, in my bean class. I have get & set methods on both.To Display the String name, i doThe above one works fine.Te below one, displays the entire Map contentsI know the KEY, how do i display the VALUE for that KEY

  28. What is native method

  29. Given a text file, input.txt, provide the statement required to open this file with the appropriate I/O

  30. What is the Difference between sendRedirect() and Forward?

Companies that ask JAVA questions