hCentive Java Interview Questions

Upasana | December 31, 2017 | 1 min read | 52 views


Multi-threading Questions

  • What do you understand by thread-safety ? What are various mechanisms to achieve thread-safety in java ?

  • 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 ?

  • What are various methods to acquire lock in java ? discuss their comparison.

  • How to avoid deadlock in your application ?

  • How is ConcurrentHashMap better than hashmap in java ?

General Java

  • What are different memory generations in Java ? What is Stack and heap memory ?

  • Write a thread-safe Singleton Java Class.

  • What is difference between hashtable, hashmap and Concurrenthashmap in java ?

  • What is difference between Iterator and ListIterator in Java ?

  • What is Immutable Class ? What is reason behind using a Immutable class in your application ?

  • What is difference between String, StringBuffer and StringBuilder ?

  • What is difference between CheckedException and UncheckedException ? Give some example of RuntimeException ?

Spring Framework

  • What are different Bean scopes in Spring ? What is the default bean scope ?

  • How many objects Spring container creates for a given bean definition ?

  • What is Bean Lifecyle ?

  • How do you encrypt a password in spring security ?

  • Describe practical use of Spring Interceptors ?

  • What is Servlet LifeCycle ?

  • How do you declare a custom error page in Spring ?

  • What is difference between doGet() and doPost() methods ?

  • What is difference between Forward and Redirect ?


Top articles in this category:
  1. Sapient Global Market Java Interview Questions and Coding Exercise
  2. Multi-threading Java Interview Questions for Investment Bank
  3. Morgan Stanley Java Interview Questions
  4. Citibank Java developer interview questions
  5. UBS Java Interview Questions
  6. Goldman Sachs Java Interview Questions
  7. ION Trading Java Interview Questions

Recommended books for interview preparation:

Find more on this topic:
Buy interview books

Java & Microservices interview refresher for experienced developers.