Wipro | Java Developer

Wipro Java Interview Questions

Wipro Java interviews test core OOP, Java 8+ features (Streams, Lambda, Optional), Spring Boot microservices, multithreading, and design patterns. Expect 2-3 technical rounds and one HR round. Focus on practical examples from real projects.

30+
Real Questions
2026
Updated
AI
Live Practice
Foundation Questions - Guaranteed to Appear
1
What are the four pillars of OOP? Explain each with a Java example.
Encapsulation: private fields with public getters/setters — hides internal state. Abstraction: abstract class Vehicle with abstract method startEngine(), concrete class Car implements it — hides implementation details. Inheritance: class SavingsAccount extends BankAccount inherits balance and withdraw(). Polymorphism: runtime (BankAccount reference pointing to SavingsAccount object, overridden calculateInterest() called at runtime) and compile-time (overloaded methods with different parameter types in same class).
2
What is the difference between HashMap, LinkedHashMap, and TreeMap?
HashMap: unordered key-value store, O(1) average get/put, allows one null key. LinkedHashMap: maintains insertion order using doubly linked list — useful for LRU cache implementation. TreeMap: sorted by key using Red-Black tree, O(log n) — useful when you need keys in natural or custom sorted order. HashMap vs Hashtable: Hashtable is synchronized (thread-safe but slower). For thread-safety in modern Java, use ConcurrentHashMap which locks at segment level, not the entire map.
3
Explain Java 8 Stream API with a practical example.
Streams provide functional-style operations on collections. Find top 3 distinct cities of employees with salary > 50000, sorted alphabetically: employees.stream() .filter(e -> e.getSalary() > 50000) .map(Employee::getCity) .distinct().sorted().limit(3) .collect(Collectors.toList()); Terminal operations (collect, count, findFirst) trigger execution — streams are lazy. Parallel streams via employees.parallelStream() split work across ForkJoinPool threads — fast for CPU-bound operations on large lists.
4
Difference between checked and unchecked exceptions in Java?
Checked exceptions extend Exception — compiler forces handling with try-catch or throws declaration. Examples: IOException, SQLException, ClassNotFoundException. Unchecked exceptions extend RuntimeException — no compile-time enforcement. Examples: NullPointerException, ArrayIndexOutOfBoundsException, IllegalArgumentException. Best practice: use checked for recoverable conditions (file not found — prompt retry), unchecked for programming errors (null reference — indicates a bug). Never catch Exception broadly and swallow it — always log with specific message.
5
How does Spring Boot auto-configuration work?
@EnableAutoConfiguration (included in @SpringBootApplication) reads META-INF/spring/AutoConfiguration.imports listing candidate auto-configuration classes. Each class uses @ConditionalOnClass, @ConditionalOnMissingBean, @ConditionalOnProperty to decide whether to activate. Example: DataSourceAutoConfiguration activates only if a database driver JAR is on classpath AND no DataSource bean is already defined. Adding spring-boot-starter-data-jpa auto-configures JPA, Hibernate, and datasource from application.properties with zero XML config.
6
How do you create a thread-safe singleton in Java?
Double-checked locking with volatile: private static volatile DatabaseConnection instance; public static DatabaseConnection getInstance() { if (instance == null) { synchronized (DatabaseConnection.class) { if (instance == null) instance = new DatabaseConnection(); } } return instance; } volatile prevents instruction reordering — without it, a thread could see a partially constructed object. Simpler alternative: enum singleton (JVM class loading guarantees thread-safety). In Spring Boot, prefer @Component singleton scope managed by the container.

Practice With Live AI Interview Simulator

GhostMode AI simulates real Wipro interviewers - ask follow-ups, get scored, and receive feedback on your answers in real-time.

Start AI Mock Interview Start Free Prep