0% found this document useful (0 votes)
37 views3 pages

Java React Wipro Interview Questions

The document is a structured interview question bank for Java and React positions at Wipro, covering various topics such as core Java, Spring Boot, React fundamentals, and system design. It includes warm-up questions, technical queries on concurrency, performance, database interactions, and practical scenarios for full-stack integration. Additionally, it emphasizes the importance of follow-up questions to assess candidates' understanding of trade-offs and production readiness.

Uploaded by

Yelagum Rahul
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views3 pages

Java React Wipro Interview Questions

The document is a structured interview question bank for Java and React positions at Wipro, covering various topics such as core Java, Spring Boot, React fundamentals, and system design. It includes warm-up questions, technical queries on concurrency, performance, database interactions, and practical scenarios for full-stack integration. Additionally, it emphasizes the importance of follow-up questions to assess candidates' understanding of trade-offs and production readiness.

Uploaded by

Yelagum Rahul
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java + React Interview Questions (Wipro) — One Set

Structured interview question bank covering backend (Java/Spring), frontend (React), integration, and
system design.

1) Quick Warm-up (5 mins)


• Walk me through a project where you used Java (Spring Boot) and React together. What was the
architecture?

• What was the most challenging bug/performance issue you solved in that project?
• How do you ensure code quality in both backend and frontend (tools + practices)?

2) Core Java + OOP (8–10 mins)


• Explain equals() and hashCode(). What issues occur if they’re inconsistent in a HashMap?
• Difference between: final, finally, finalize()
• Difference between: == vs equals()
• When would you use: Interface vs Abstract class?
• Explain immutability. How do you make a custom class immutable?
• What are checked vs unchecked exceptions? When do you create custom exceptions?

3) Java Concurrency & Performance (8–10 mins)


• Difference between synchronized, ReentrantLock, and volatile.
• Explain ThreadPoolExecutor. Why prefer thread pools over creating threads directly?
• What is deadlock? Give a real scenario and how you'd prevent it.
• How would you debug high CPU / memory leak in a Java service? (tools, steps)

4) Spring Boot + REST + Microservices (12–15 mins)


• Explain Spring Bean lifecycle and dependency injection.
• What is the difference between @Component, @Service, @Repository?
• Design a REST API for Customer: Endpoints for CRUD; Status codes you’d return and why
• How do you handle: Validation (request validation); Global exception handling in Spring Boot?
• Explain Spring Security flow at a high level. How does JWT authentication work?
• What is idempotency? Which HTTP methods are idempotent and why it matters?
• Microservices: How would services communicate? (sync vs async)
• Microservices: How do you handle timeouts and retries?
• Microservices: What is circuit breaker?
5) Database + JPA/Hibernate (10 mins)
• Difference between JPQL and native query. When to use which?
• Explain lazy vs eager loading. What problems can lazy loading cause?
• What is the N+1 query problem? How do you detect and fix it?
• Explain transaction isolation levels and a case where you'd increase isolation.
• Indexing: What is an index?
• Indexing: When can indexing make performance worse?

6) React Fundamentals (10–12 mins)


• Difference between state and props. When to lift state up?
• What are controlled vs uncontrolled components?
• Explain useEffect: When does it run? How to avoid infinite loops?
• Why are keys needed in lists? What happens if you use array index as key?
• How do you optimize React rendering? [Link], useMemo, useCallback
• Error handling in React: What are Error Boundaries? Where do they help?

7) React + API Integration + Security (10–12 mins)


• How do you structure API calls? fetch/axios, service layer, interceptors
• How do you handle loading states, error states, retries?
• Auth: Where do you store JWT and why? (localStorage vs httpOnly cookie)
• Auth: What is CSRF? How do you protect against it?
• How would you implement role-based UI access (e.g., admin pages) and route guards (protected
routes)?

8) Full-Stack Integration Scenario (Practical Thinking) (10 mins)


• Scenario: “User clicks Submit and order gets created.” Explain end-to-end flow from React → API
→ DB → response; What validations happen where?; What logs/metrics would you add?

• Scenario: “API is slow (4 seconds)” What would you do on frontend? What would you do on
backend? How would you measure improvement?

9) Mini System Design (For 3–7 yrs level) (12–15 mins)


• Design a task management system (like Jira-lite): Entities (User, Task, Project); APIs; DB schema
(high level); Pagination, sorting, filtering

• How would you implement: Search tasks by keyword? Audit logs? Notifications
(email/event-driven)?

• How would you approach: scalability, caching, rate limiting


Tip: Use follow-up questions on trade-offs, edge cases, and production readiness to differentiate strong
candidates.

Common questions

Powered by AI

Immutability in Java refers to objects whose state cannot be altered after creation. Creating immutable objects contributes to application stability by preventing side effects caused by unintended modifications, thus ensuring consistency across threads in a concurrent environment. This characteristic reduces the complexity of programs and enhances thread-safety without additional synchronization. In terms of security, immutable objects protect against uncontrolled alterations, minimizing vulnerabilities and ensuring reliable software behavior .

Error Boundaries in React are components that catch JavaScript errors in their child component tree, preventing the errors from corrupting the whole application. By catching errors and rendering fallback UI, they enhance application robustness, ensuring users have a more stable experience even when parts of the app encounter problems. Error Boundaries address errors for rendering, lifecycle methods, and constructors within the component tree, but they do not catch errors in event handlers or asynchronous code .

The N+1 query problem in Hibernate occurs when one initial query to fetch an entity results in N additional queries to retrieve associated entities, significantly impacting application performance by increasing the number of database round-trips. This inefficiency can lead to longer response times and excessive database load. The problem can be addressed by using techniques such as eager fetching to retrieve all needed data in a single query or employing batch fetching strategies to reduce the number of queries .

Designing a REST API for managing customer data involves creating endpoints for CRUD operations: POST for creating a new customer, GET for retrieving customer details, PUT for updating customer information, and DELETE for removing a customer. It's critical to return appropriate status codes to clients to convey operation results clearly. Common status codes include 201 (Created) for successful POST requests, 200 (OK) for successful GET or PUT, 204 (No Content) for successful DELETE, 404 (Not Found) when a customer is not available, and 400 (Bad Request) for validation errors .

React rendering can be optimized using techniques such as React.memo, useMemo, and useCallback. React.memo prevents unnecessary re-renders by memoizing components’ output. useMemo caches computed values, preventing recalculation on every render unless dependencies change. useCallback maintains reference equality for callback functions to avoid unnecessary re-renders of child components. These strategies improve application performance by reducing rendering overhead, thus enhancing responsiveness and reducing resource consumption .

Handling timeouts and retries in a microservices architecture involves setting appropriate timeout limits on requests and implementing intelligent retry mechanisms. Timeouts prevent indefinite waiting periods, ensuring resources are freed and avoiding potential bottlenecks. Retries help maintain service availability by attempting to recover from temporary failures. However, pitfalls include the risk of cascading failures if not handled properly, network congestion due to multiple retry attempts, and increased latency impacting user experience. Properly configuring backoff strategies can mitigate these issues .

Spring Security provides a comprehensive security framework with mechanisms like authentication and authorization, integrating JWT authentication by encoding security credentials into a token structure. The JWT allows stateless authentication, where each request independently contains all necessary authentication data. Benefits include reduced server overhead as tokens are self-contained, scalability across distributed systems, and easier mobile or single-page application integrations, as tokens can be stored client-side securely .

In Hibernate, lazy loading defers the loading of related entities until they are explicitly accessed, thereby reducing initial resource usage. Eager loading retrieves all associated entities immediately with the query execution. Lazily loaded entities can lead to issues such as the N+1 query problem, where accessing a lazy-loaded field in a loop causes additional queries, degrading performance. Lazy loading also requires careful handling to avoid LazyInitializationExceptions when accessing associations outside session boundaries .

Debugging a high CPU or memory leak issue in a Java service involves profiling the application to identify bottlenecks and leaks. Useful tools include Java Flight Recorder for CPU profiling, analyzing thread dumps with VisualVM, and using heap dump analysis tools like Eclipse Memory Analyzer (MAT). Debugging typically involves tracking resource usage over time to pinpoint leaks, reviewing application logs for anomalies, and isolating problematic areas in code for closer inspection and resolution .

The equals() and hashCode() methods are crucial in Java because they are used to determine object equality and are key components in collections like HashMap. If these methods are inconsistent—meaning two objects that are considered equal by equals() have different hash codes—it may lead to data inconsistencies and unpredictable behavior in HashMap operations. Specifically, an object could be stored in one bucket, but not retrievable later using an equivalent object, breaking the functionality of finding objects efficiently .

You might also like