Java Questions 16 total
Java ×
0
0
answers
1How to prepare for a Java developer interview?
Java interviews at product companies cover 4 areas. Here's exactly what to prepare:
**1. Core Java (always asked):**
- OOPs: inheritance, p...
0
0
answers
2What is the salary of a full stack developer in India 2025?
Full stack developer salaries in India (2025):
**By experience:**
- Fresher (0-1 year): ₹3.5 – ₹7 LPA
- Junior (1-3 years): ₹7 – ...
0
0
answers
3What is MongoDB aggregation pipeline?
The aggregation pipeline processes documents through a sequence of stages, similar to SQL's GROUP BY + JOINs.
**Common stages:**
- `` — f...
0
0
answers
4How do you handle authentication in a MERN stack app?
The standard approach uses JWT (JSON Web Tokens):
**Flow:**
1. User logs in → sends email + password to Express
2. Express validates cred...
0
0
answers
5What is the difference between useCallback and useMemo in React?
Both are React hooks for performance optimisation — they prevent unnecessary recalculations:
**useMemo — memoises a VALUE:**
```jsx
con...
0
0
answers
6What is the MERN stack and how does it work together?
MERN is a full-stack JavaScript framework combining 4 technologies:
**M — MongoDB:** NoSQL database (stores data as JSON documents)
**E �...
0
0
answers
7What is multithreading in Java and how do you implement it?
Multithreading allows a Java program to execute multiple threads simultaneously, improving performance for concurrent tasks.
**Two ways to ...
0
0
answers
8What is the difference between ArrayList and LinkedList in Java?
Both implement the `List` interface but with different internal structures:
**ArrayList:**
- Backed by a dynamic array
- O(1) random access...
0
0
answers
9What is Spring Boot and why is it used for backend development?
Spring Boot is a framework that makes it easy to create production-ready Java applications with minimal configuration.
**Why Spring Boot ov...
0
0
answers
10What is the difference between JDK, JRE, and JVM?
This is one of the most common Java interview questions.
**JVM (Java Virtual Machine):**
- Executes Java bytecode
- Platform-specific (Wind...
0
0
answers
11What is the difference between useState and useEffect in React?
**useState** — manages state (data that can change over time)
**useEffect** — handles side effects (API calls, subscriptions, timers)
`...
0
0
answers
12What is async/await in JavaScript?
**async/await** is syntactic sugar over Promises that makes asynchronous code look synchronous.
```javascript
// With Promises
fetch('/api/...
0
0
answers
13What is the difference between var, let, and const in JavaScript?
All three declare variables, but with different scope and mutability:
**var:** function-scoped, hoisted, can be redeclared
**let:** block-s...
0
0
answers
14What is Node.js and why is it used?
Node.js is a JavaScript runtime built on Chrome's V8 engine that lets you run JavaScript on the server side.
**Why use it:**
- **Non-blocki...
0
0
answers
15What is REST API and how does it work?
REST (Representational State Transfer) is an architectural style for building APIs.
Key principles:
- **Stateless** — each request is ind...