facebook tw in
Professional Training - Training Courses Java, J2EE, QA, Business Analysis, SFDC, Data Warehouse
 


JAVA/J2EE INTERVIEW QUESTIONS

Java    J2EE, Servlet, JSP    JDBC    Struts    EJB    JMS    Web Services    Hibernate    Spring    Misc.                                       Back to Java Training Page

JAVA INTERVIEW QUESTIONS

  1. What is the the difference between String and String buffer?
  2. Explain the concepts of exception handling in Java?
  3. What is immutable object. How do you create it? Give some examples.
  4. Difference between ArrayList and Array?
  5. Difference between Static and Final?
  6. Purpose Garbage Collector in Java?
  7. What is the comparator?
  8. What is hashcode?
  9. What is the relationship between campareTo and comparator?
  10. How to you define constants in Java?
  11. What is main keywords in exception handling?
  12. What is final, finalize and finally?
  13. What is difference between checked and unchecked exception?
  14. What is overriding?
  15. Why Java is platform independent?
  16. Class A has test() method that is public and class B is extending A and also has test() method that is overriding test() method of A. Can we make test( )method of B private?. If we make it private, will it give compile time error or not?
  17. Class A has test() method that and class B is extending A and also has test() method that is overriding test() method of A. In main method, we are writing A a = new B(), which version of test() will be called here, class A or class B?
  18. What is the term used for an Interface which does not have any functions (like Serializable)?
  19. What is Constructor chaining?
  20. What is enhanced for-each loop in jdk1.5?
  21. What is the new features introdued in jdk 1.5?
  22. Relation between equals() and hashcode(). If equals() give true, will hashcode() give equal value, what if equals() gives false?
  23. What is garabage collector?
  24. What is generics? Benefit of generics?
  25. Difference between Abstract class and Interface?
  26. How to make immutable class?
  27. What is the differnt between String and String buffer?
  28. What is the difference between equals and == ?
  29. What is meaning transient modifier?
  30. What is the meaning of serialization?
  31. Why is finally block used? did finally block gets executed everytime a try block is executed?
  32. Why is String class immutable in java? What is the benefit of being immutable.
  33. What is the internal data structure of Hashmap. Is it ArrayList or LinkedList or both.
  34. Which syncronization?
  35. What is daemon thread?
  36. What is suspend method in multi threading. Can a suspended thread be resumed?
  37. What will happen if we call interrupt method immediately after calling sleep method. Will thread be interrupted or not?
  38. Suppose a class AA has a static variable and in main method we are starting 3 threads that are calling method of AA class. Will static variable be shared by all the threads?
  39. Can we make a whole class synchronized?
  40. Purose Synchrinization in Treading?
  41. How many ways you can do syncronization?
  42. How to avoid deadlock in threads.
  43. What is Volatile?
  44. What is wait(), notify() and notifyAll()?
  45. Does ArrayList Allows null objects?
  46. Difference between hashmap and hash table?
  47. Map map = new Hashmap():: Which one is key and which one is value in angle brackets?
  48. How would you iterate through the elements of an ArrayList. Write the pseudo code.
  49. How hashmap works behind the scenes when we use the get() method?
  50. What is different between Array and Array List?
  51. What is the purpose set interface?
  52. What is bubble sorting?
  53. List has ob1, ob2, ob3. When we iterate the List, what will be the order of objects printed in console.
  54. Suppose we have a list and we are iterating over the list. Multiple threads are accessing list object and adding and deleting objects from the list. How to make this process thread safe?
Back to top

J2EE, SERVLETS, JSP INTERVIEW QUESTIONS

  1. What is the request and session Scope?
  2. What is the sendRedirect() and forward?
  3. What is session tracking and how do you track a user session in servlets?-
  4. How do you pass data (including JavaBeans) to a JSP from a servlet?
  5. What is the flow of request in a simple web application using servlets and JSP?
  6. We override service() method in servlets but why we don’t use service() name in our servlets? Why we use doGet and doPost?
  7. What exclusively is done by doGet() that is not done by doPost().
  8. What is SCOPE in JSP? What are are the various possible scopes can be in JSP.
  9. What is the difference between saving a cookie and caching.
  10. What is the difference between MVC 1 and MVC 2?
  11. When we deploy web application war file on a server, how many default instances of servlets are created.
  12. Explain the difference between POST and GET.Which is secure?
Back to top

JDBC INTERVIEW QUESTIONS


  1. What is connection pooling?
  2. Different types of JDBC drivers?
  3. Difference between simple statement and PreparedStatement. Which one is better?
  4. How do we do indexing in database?
  5. What is the purpose of having triggers in database?
  6. Write a query to find the second highest salary in a table that returns the id.
  7. Difference between inner join and outer join?
  8. What is different getter and setter methods available in Result set?
Back to top

STRUTS INTERVIEW QUESTIONS


  1. Difference between Action Form and Dyna Action form in the context of Struts.
  2. What is Session Management in Struts?
  3. How Validation Framework in Struts sent errors to the client side?
  4. What is the role of reset() method in Action Form class?
  5. Explain the struts structure?
  6. What is redirect=true
  7. How many instances of a Actions will exist in servlet container?
  8. What is Dispatch Action? Give an example
  9. What is validation.xml?
  10. What is four paramters passed to execute method?
  11. How many ways we can perform validations using struts
  12. What is the role of message resources?
  13. What is the action errors and action errors
  14. What is need of ?
  15. Can you explain tag?
  16. What are the main tag libs in JSTL?
  17. What is the JSTL?
  18. Tell me 10 tags in JSTL?
Back to top

EJB (Enterpise Java Beans) INTERVIEW QUESTIONS


  1. What is Entity Bean?
  2. What is the stateful session Beans?
  3. what is six transaction attributes?
  4. What is activation and passivation?
  5. Which bean participated in passivation?
  6. If there is a custom exception class in server side and exception has to be thrown on client side, how it can be achieved?
  7. What is difference between staless and stateful session bean?
  8. What is the difference between ejbActivate() and ejbPassivate() methods?
  9. What is isolation level?
  10. What is the bean managed persistance? Which bean participate in bean manged participate
  11. What are various method of EJB?
Back to top

JMS INTERVIEW QUESTIONS


  1. What is JMS?
  2. What is Queue?
  3. What is the topic?
  4. What is payload?
Back to top

WEBSERVICES INTERVIEW QUESTIONS


What is the use of SOAP

  1. How to you Create Web Services client?
  2. What is the WSDL?
  3. What does WSDL Contains?
  4. How to handles Exception in WebServices?
  5. How would you call a method located on a remote computer?
  6. How would you look up a method located on a remote computer?
  7. Difference between SOAP and REST?
Back to top

HIBERNATE INTERVIEW QUESTIONS


  1. Benefit of using hibernate over JDBC?
  2. In Hibernate, what is your choice; using annotations or xml file? What is the benefit of using annotations over xml and vice-versa.
  3. What are the main methods you use in hibernate? List 6 methods and their use?
  4. What is Hibernate mapping file contains?
  5. "
  6. What is the purpose of following tags in the hibernate mapping? A. Id B. Class C. Join D. List E. Mapping F. Many-to-many G. Map H. Natural-id I. Sql-query J. import
  7. "
  8. what is criteria class?
  9. What is the projection class?
  10. What is session factory?
  11. What is the data source? How do you configure in tomcat and use it?
  12. Can we use data source in hibernate? How to configure that? Can we configure multiple databases in hibernate?
  13. Explain Hibernate Architecture?
Back to top

SPRING INTERVIEW QUESTIONS


  1. What is aspect oriented programming in Spring?
  2. Do you see any issues in MVC pattern? What is the benefit of using MVC.
  3. What is Dependency injection in Spring and what is its benefit.
  4. What module of Spring you have used? Was it core or something else?
  5. What is dependency injection and how do you do this with respect to database?
Back to top

MISCELLANEOUS INTERVIEW QUESTIONS


DESING PATTERNS INTERVIEW QUESTIONS


  1. What design patterns you have used.
  2. Difference between singleton and factory pattern
  3. Difference between Singleton and Static? Benefits of using singleton over static.
  4. What is Service Locator pattern and where we use it.
  5. What is adapter design pattern in java?
  6. How would you make a singleton class’s getInstance() method synchronized without using synchronized key word?
  7. How many design patterns have you worked on? Can you explain the Singleton pattern.
  8. How getInstance method of Singleton class can be made thread safe.
  9. Can a Singleton class be sub classed? If it can be, will it also be singleton?
  10. Give me a practicle example for Single ton pattern?
Back to top

XML INTERVIEW QUESTIONS


  1. Explain the difference between XML DOM and XML SAX parser?
  2. What is the purpose of XSLT?
Back to top

UNIX INTERVIEW QUESTIONS


  1. What is the command to check permission in UNIX?
  2. What is ps -ef command does?
  3. What is kill - 9 does?
  4. how do you get a line from a file and copy that into another file using UNIX
  5. What is the UNIX command to check the process running?
Back to top

UML INTERVIEW QUESTIONS


  1. What composition, aggregation?
  2. What is the use case diagram?
  3. What is the multiplicity?
Back to top

 

 
 


      Home   About Us   Services   Training   Contacts   Downloads  

  © Copyright 2007 VividianSoft. All Rights Reserved.