The top 40 Java interview questions for freshers in 2026 cluster into seven buckets: OOP four pillars (30%), Java fundamentals (JDK/JRE/JVM, data types) (15%), String handling and immutability (10%), Collections framework (15%), exception handling (8%), multithreading basics (8%), and JDBC/SQL basics (7%). Most fresher rounds at TCS NQT, Infosys InfyTQ, Cognizant GenC, and Accenture include 10–12 Java MCQs and 1–2 live coding questions on HackerRank. This guide gives all 40 with answers and 12 working Java code examples.
Table of Contents
- Java Topic Weightage in 2026 Fresher Interviews
- Company Round Formats (TCS / Infosys / Accenture)
- Java Fundamentals (Q1–Q7)
- OOP Concepts in Java (Q8–Q18)
- String Handling (Q19–Q22)
- Collections Framework (Q23–Q30)
- Exception Handling (Q31–Q34)
- Multithreading (Q35–Q37)
- JDBC & Coding Patterns (Q38–Q40)
- 4-Week Java Interview Prep Plan
Java Topic Weightage in 2026 Fresher Interviews
| Topic Cluster | Frequency in MCQ | Frequency in Coding |
|---|---|---|
| OOP four pillars (encapsulation, inheritance, polymorphism, abstraction) | 30% | 25% |
| Java fundamentals (JDK/JRE/JVM, data types, operators) | 15% | 10% |
| Collections framework (ArrayList, HashMap, HashSet) | 15% | 20% |
| String handling and immutability | 10% | 15% |
| Exception handling (try/catch/finally, checked vs unchecked) | 8% | 10% |
| Multithreading basics (Thread, Runnable, synchronized) | 8% | 10% |
| JDBC / SQL basics | 7% | 5% |
| Coding patterns (reverse linked list, two-sum, balanced parens) | — | 10% |
Trend in 2026: Collections questions (especially HashMap internals — bucketing, collision, equals/hashCode) have grown from 8% in 2024 to ~15% in 2026, reflecting the shift from pure-OOP interviews to production-readiness filtering.






