In this post, I'm going to cover questions that are really popular among the interviewers for a Java Developer position. I'm a Java Developer with around 7 years of experience and I've prepared a list of questions with my interview experiences that are a must for every Java Interview. If you are going for an interview, you should brush up below questions.
Must Interview Questions for Java Developer
Core Java
- What are OOPs? Difference between Encapsulation and Abstraction. See Answer Here
- What is String Pool? See Answer Here
- What is the difference between Inheritance and Composition? Which one we should use when?
- What are SOLID principles?
- How many ways are there to create an Object?
- What are marker interfaces? Why do we need them? How does JVM identify a marker interface?
- What are the new features of the newest Java version that you are currently using?
- Questions on Lambda expressions
Advanced Java
- Differentiate between Arraylist, LinkedList, and HashSet.
- How does HashSet work internally? How does it maintain uniqueness?
- What is ConcurrentHashMap? Differentiate between HashTable, HashMap, and ConcurrentHashMap. How does ConcurrentHashMap work internally?
- What is a Singleton class? How do you create a Singleton class? How do you break a Singleton class? How to create a Singleton class for a multithreaded environment?
- How many ways are there to create a Thread? Which one to use and why?
Spring and Spring Boot
- What is Dependency Injection?
- How many ways to inject beans? Which one is best and why?
- What is the default bean scope? How to change/define the scope of a bean?
- How does RequestMapping annotation work internally?
- How to enable transactions? What's the benefit of using transactions?
- What are Aspect, Advice, PointCut, and JoinPoint in AOP?
- How to disable a specific auto-configuration? How to register a custom auto-configuration?
- What is ConditionalOnMissingBean annotation?
- Why do we need Spring Profiles?
- Which is better - Properties or YAML? Why?
No comments:
Post a Comment