Received an informal call from a recruiter. We quickly ran through my resume and how many years of experience i have with each language. I was also asked about salary expectations
I applied through college or university. I interviewed at Infosys (Pune) in Aug 2022
Interview
1. What is Java? Why is it platform-independent?
Java runs on JVM → bytecode → machine code → so it works on any OS.
2. Difference between JDK, JRE, and JVM
JDK → development kit
JRE → runtime environment
JVM → executes bytecode
3. OOPS Concepts (Infosys always asks)
Encapsulation
Inheritance
Polymorphism
Abstraction
4. Difference between Overloading and Overriding
Overloading – compile time, same method name, different params.
Overriding – runtime, same signature in subclass.
5. What is this keyword?
Refers to current object.
6. What is super keyword?
Refers to parent class.
7. What is constructor? Types?
Default
Parameterized
Used to initialize objects.
8. Difference between abstract class and interface
Abstract → can have concrete + abstract methods
Interface → only abstract methods (Java 8 allows default/static)
9. Can Java support multiple inheritance
10. What is String pool?
Area in heap memory that stores unique string literals.
11. Difference between String, StringBuilder, StringBuffer
String → immutable
StringBuilder → mutable, not thread-safe
StringBuffer → mutable, thread-safe
12. What is exception handling?
try, catch, finally, throw, throws
13. Checked vs Unchecked Exceptions
Checked → compile time (IOException)
Unchecked → runtime (ArithmeticException)
14. Collections vs Arrays
Collections grow dynamically, array has fixed length.
15. Difference between List, Set, Map
List → ordered, duplicates allowed
Set → unique, no duplicates
Map → key-value pairs
16. HashMap vs Hashtable
HashMap → not synchronized, faster
Hashtable → synchronized, slower
17. What is a Thread? How to create?
Extend Thread OR implement Runnable.
18. What is synchronization
The interview process was good and I even got mail asking for availability for face to face round.This continued for about 3 weeks each time asking for availability even though I stated I was available and then I decided to check their portal which stated I was rejected in F2F even though they didnt conduct the second round of interview
Interview questions [1]
Question 1
Spring/Java related basics and stuff related to whats in my resume