- How to move all 0s to the beginning and all 1s to the end of an array?
- Why is the
main
method in Java static? - How do classes load in Java?
- What is the classpath and how does it differ from the system
PATH
? - How many types of class loaders are there in Java?
- How would you update a value in a
HashMap
if a city’s name changes? - Why are
HashMap
keys immutable? - Can we override a static method in Java?
- Why can’t we override static methods?
- Can we overload static methods?
- Explain the Singleton design pattern.
- How can you make the Singleton pattern thread-safe with lazy loading and eager loading variations?
- Why do we use the
synchronized
keyword? What’s the alternative tosynchronized
? - Tell me about a feature you developed in your previous Java project.
- Explain Microservices communication.
- How can you handle serving multiple requests in a web application?
- How and when do you use the
this
andsuper
keywords in Java? - Can you use
this
andsuper
together? - If both
this
andsuper
are required in any scenario, how would you handle it? - Can we rethrow an exception? How would you rethrow an exception?
- Explain Java inheritance.
- Describe the architecture of microservices.
- Explain design patterns.
- How do microservices communicate?
- What is Spring Security?
- What is a Spring Bean?
- What is the default scope of a Spring Bean?
- How does a
HashMap
work internally? - What will happen if you call
hashMap.put(1, 0)
and thenhashMap.put(1, 100)
? - Explain the concepts of Request Body, Response Body, and ResponseEntity in the context of Spring.
- Describe the internal working of the
HashMap
data structure.
Feel free to ask if you have any more questions or need further explanations on any of these topics!
Leave a comment