Sunday, April 19, 2015

hCentive Java Interview Questions

Multi-threading Questions
  1. What do you understand by thread-safety ? What are various mechanisms to achieve thread-safety in java ?
  2. How will you design your own ReentrantReadWriteLock class where one thread can write and  many threads can read in parallel ? How does it affect the throughput of a multi-threaded system ?
  3. What are various methods to acquire lock in java ? discuss their comparison.
  4. How to avoid deadlock in your application ?
  5. How is ConcurrentHashMap better than hashmap in java ?
General Java
  1. What are different memory generations in Java ? What is Stack and heap memory ?
  2. Write a thread-safe Singleton Java Class.
  3. What is difference between hashtable, hashmap and Concurrenthashmap in java ?
  4. What is difference between Iterator and ListIterator in Java ?
  5. What is Immutable Class ? What is reason behind using a Immutable class in your application ?
  6. What is difference between String, StringBuffer and StringBuilder ?
  7. What is difference between CheckedException and UncheckedException ? Give some example of RuntimeException ?
Spring Framework
  1. What are different Bean scopes in Spring ? What is the default bean scope ?
  2. How many objects Spring container creates for a given bean definition ?
  3. What is Bean Lifecyle ?
  4. How do you encrypt a password in spring security ?
  5. Describe practical use of Spring Interceptors ?
  6. What is Servlet LifeCycle ?
  7. How do you declare a custom error page in Spring ?
  8. What is difference between doGet() and doPost() methods ?
  9. What is difference between Forward and Redirect ?

No comments:

Post a Comment

Your comment will be published after review from moderator