Synechron Java Interview Questions

Upasana | April 27, 2019 | 1 min read | 185 views


General Questoins

  1. What is Serialization?

  2. What is shallow and deep cloning?

  3. How to make a Java class immutable? Let’s say that the class returns a Date and List Object, what changes now will be required to make this class immutable? Are there any tools/plugins that can help you in getting errors/warning related to immutability issues?

  4. What is a Singleton? where did you use it lastly? What are pitfalls associated with it?

  5. Write down a multi-threading code that will print even and odd numbers in sequence? explain how do you coordinate among these two threads?

  6. What is static and dynamic polymorphism?

  7. What is Selection Sort Algorithm?

  8. Generics difference between E and T?

  9. Explain different Memory Types in Java? (Heap, Stack and Method Area)

Collections

  1. What is difference between HashSet and TreeSet? When should I choose one over the other?

  2. What is difference between Hashmap and Treemap?

  3. What is difference between Comparator and Comparable?

Design Problems

  1. Parking Lot Vehicle Problem.

  1. There is a backup table B that has almost replica of Table A, How will you find the unique data and remove redundant data?

  2. SQL level joins?

  3. Difference between ON and WHERE clause in SQL table join?

Spring

  1. Explain different Spring session scopes? (singleton, prototype, etc)

  2. How will you Inject a Prototype Bean into Singleton Scoped Bean?


Top articles in this category:
  1. How does Session handling works in Servlet environment
  2. Feign Client Logging and connection timeout
  3. Feign RequestInterceptor in Spring Boot
  4. Java AWS Lambda using Spring Cloud Function
  5. Send Gupshup SMS using Java API
  6. What is difference between Component, Repository, Service, Controller & RestController
  7. Generate UPI QR Code in Java

Recommended books for interview preparation:

Find more on this topic:
Buy interview books

Java & Microservices interview refresher for experienced developers.