Java + React + Web Services Interview
Questions with Answers (Wissen
Company)
JAVA QUESTIONS (Core Java)
• Q: What is OOP?
A: OOP means Object-Oriented Programming. It uses classes and objects. Main
concepts:
- Encapsulation: Hiding data using private fields.
- Inheritance: One class can use features of another.
- Polymorphism: Same method works differently.
- Abstraction: Hiding complex things and showing only needed parts.
• Q: What is the difference between ArrayList and LinkedList?
A: - ArrayList is faster when you access elements.
- LinkedList is better when you add or remove items often.
• Q: What is HashMap? How does it work?
A: HashMap stores data as key-value pairs. It uses a hash function to find the location of
each key. It allows fast access if the key is known.
• Q: What is the difference between == and `.equals()`?
A: - `==` checks if two objects are same in memory.
- `.equals()` checks if two objects have same value.
SPRING BOOT + WEB SERVICES
• Q: What is Spring Boot?
A: Spring Boot is a tool to make Java apps easily. It helps to create REST APIs quickly
with less code.
• Q: What is REST API?
A: REST API allows different apps to talk using HTTP (like GET, POST). Example: A
mobile app asking a server for user data.
• Q: What is @RestController?
A: @RestController is used in Spring to make a class handle web requests, like a page
or API.
• Q: What is @Autowired?
A: Spring uses @Autowired to automatically give objects (dependencies) to classes.
• Q: What is the difference between GET and POST in API?
A: - GET is used to read data.
- POST is used to send data to the server.
• Q: How do you handle errors in REST API?
A: Using @ExceptionHandler or @ControllerAdvice, we can catch errors and return a
proper message.
REACT JS QUESTIONS
• Q: What is React?
A: React is a JavaScript library to build fast and dynamic web apps using components.
• Q: What is a component in React?
A: A component is a reusable piece of UI, like a button or form.
• Q: What is useState in React?
A: useState is a hook to store and update data in a component.
• Q: What is useEffect?
A: useEffect is used to run code when a component loads, updates, or unmounts (like
fetching API data).
• Q: How do you call an API in React?
A: Using fetch() or axios:
useEffect(() => {
fetch("https://api.com/data")
.then(res => res.json())
.then(data => setData(data));
}, []);
SQL + LOGIC
• Q: Write a query to find the 2nd highest salary.
A: SELECT MAX(salary)
FROM employee
WHERE salary < (SELECT MAX(salary) FROM employee);
GENERAL/HR
• Q: Tell me about yourself.
A: "I'm a Java developer skilled in Spring Boot and React. I’ve worked on projects like a
pet adoption system and learned full-stack development. I enjoy solving problems and
learning new tech."
• Q: Why do you want to join Wissen?
A: "Wissen works on real-world banking and enterprise projects. It values good coding
and architecture, and I want to grow in that kind of professional setup."
• Q: What is your strength?
A: "I'm good at understanding logic quickly and learning tools by doing hands-on work."
• Q: Do you have any questions for us?
A: "Yes! What kind of projects will I get to work on? How is the learning process for new
joiners at Wissen?"
ADVANCED JAVA & BACKEND CONCEPTS
• Q: What is an immutable class?
A: A class whose objects can’t be changed once created. Example: String in Java.
• Q: What are some features of Java 8?
A: Lambdas, Streams API, Functional Interfaces, Optional, Default methods in
interfaces.
• Q: What is the difference between synchronized and Lock?
A: Lock gives more control than synchronized like trying to lock or timing out.
• Q: How does garbage collection work in Java?
A: JVM automatically deletes unused objects to free memory.
MICROSERVICES ARCHITECTURE
• Q: What is Microservices?
A: A way to break large apps into small, independent services that talk via APIs.
• Q: How do microservices talk to each other?
A: Mostly through REST APIs or message brokers like RabbitMQ, Kafka.
• Q: What is the role of an API Gateway?
A: It acts as a single entry point for all microservices (e.g., Netflix Zuul, Spring Cloud
Gateway).
• Q: What is Service Discovery?
A: In microservices, services register themselves so others can find them (e.g., Eureka).
SPRING SECURITY (BASICS)
• Q: How does Spring Security work?
A: It secures APIs by checking username, password, and roles. Works with JWT too.
• Q: What is JWT?
A: JWT = JSON Web Token, used for secure login without saving session on server.
CI/CD & DEVOPS BASICS
• Q: What tools are used for CI/CD?
A: Jenkins, GitHub Actions, Docker, Kubernetes.
• Q: What is Docker?
A: Docker packages your app with all dependencies so it works anywhere.
REACT ADVANCED TOPICS
• Q: React Lifecycle (Class vs Hooks)
A: Class: componentDidMount, componentDidUpdate
Hooks: useEffect() replaces lifecycle methods.
• Q: How do you show content based on conditions?
A: Using if, ternary, or && in JSX:
{isLoggedIn ? <Home /> : <Login />}
• Q: How do you share data between components?
A: Using Props, Context API, or Redux.
PROJECT-BASED QUESTIONS
• Q: How did you design your project?
A: Explain your architecture: frontend in React, backend in Java/Spring Boot, DB like
MySQL.
• Q: What was the toughest part?
A: Mention a bug or integration challenge and how you solved it.
• Q: How did you connect frontend to backend?
A: Using Axios or Fetch API to call REST endpoints from React to Spring Boot.
• Q: How did you test your API?
A: Used Postman or Swagger to test endpoints, and JUnit for backend testing.
SCENARIO-BASED QUESTIONS
• Q: API call is failing with 500 error. How will you debug?
A: Check backend logs, API URL, input format, and exception handling.
• Q: Frontend shows old data even after refresh — what might be wrong?
A: Check API caching, stale state, or missing re-fetch logic.
• Q: Two services fail to talk — what can be the issue?
A: Check service discovery, ports, firewalls, and network connectivity.