Complete Java Full Stack Interview Preparation - Pradeep Kumar
1. Simple Resume Explanation (Tell Me About Yourself)
I completed my [Link] in Computer Science from Manav Rachna University and currently
work as a Software Engineer at Acutec Global Services Pvt. Ltd.
I have around 2+ years of experience working on Java Full Stack Development using Java,
Spring Boot, Spring MVC, Hibernate, JSP, Angular, PostgreSQL, and MySQL.
In my current role, I work on backend API development, frontend integration, database
operations, and production support. I have also worked on banking transaction systems
involving NEFT, RTGS, and LC/BG message processing.
One of my major achievements was migrating a legacy Apache Struts application running on
JDK 7 and Tomcat 7 to Spring MVC with JDK 17 and Tomcat 10. This migration improved
application performance, security, maintainability, and compatibility with modern
enterprise standards.
I also implemented Maker-Checker workflows used in banking systems for secure
transaction authorization.
I enjoy debugging production issues, optimizing backend logic, and developing scalable
enterprise applications.
2. Core Java Interview Questions with Detailed Answers
Q: What is the difference between JDK, JRE, and JVM?
JVM (Java Virtual Machine) is responsible for running Java bytecode.
JRE (Java Runtime Environment) provides libraries and runtime needed to run Java
applications.
JDK (Java Development Kit) contains JRE + development tools like compiler, debugger, etc.
Example:
If you only want to run a Java application, JRE is enough.
If you want to develop Java applications, you need JDK.
Q: Explain OOP concepts in Java.
The four main OOP concepts are:
1. Encapsulation – Wrapping data and methods into a single class.
2. Inheritance – One class acquires properties of another class.
3. Polymorphism – Same method behaves differently.
4. Abstraction – Hiding implementation details.
Example:
A Vehicle class can have a start() method, and Car/Bike can implement it differently.
Q: Difference between == and equals()?
== compares memory reference while equals() compares actual object values.
Example:
String a = new String("Java");
String b = new String("Java");
a == b → false
[Link](b) → true
Q: What is a HashMap and how does it work internally?
HashMap stores data in key-value pairs.
Internally:
Java creates a special number called a hash code from the key
1. Hash code is generated for key.
Using the hash code, Java finds a location in memory called a bucket.
2. Bucket is identified.
3. Data is stored in bucket.
The key and value are stored together inside that bucket.
4. Retrieval becomes very fast.
Average time complexity is O(1).
Example:
[Link](1, "Pradeep");
Q: Difference between ArrayList and LinkedList?
ArrayList uses dynamic arrays while LinkedList uses doubly linked list.
ArrayList:
- Faster searching
- Slower insertion/deletion
LinkedList:
- Faster insertion/deletion
- Slower searching
Use ArrayList when frequent searching is needed.
Q: What is Exception Handling?
Exception handling is used to handle runtime errors and prevent application crash.
Keywords:
try → risky code
catch → handles exception
finally → always executes
Example:
try {
int a = 10/0;
} catch(Exception e) {
[Link](e);
}
3. Spring Boot & Hibernate Questions
Q: What is Spring Boot?
Spring Boot is a framework used to quickly build Java applications with minimal
configuration.
Advantages:
- Auto configuration
- Embedded Tomcat
- Faster development
- Production ready
Example:
We used Spring Boot for backend REST API development.
Q: Explain Spring Boot Architecture.
Flow:
Client Request → Controller → Service → Repository → Database
Controller:
Handles HTTP request.
Service:
Contains business logic.
Repository:
Handles database interaction.
Database:
Stores application data.
Q: What is Dependency Injection?
Dependency Injection allows Spring to automatically create and manage objects.
Example:
@Autowired
private UserService userService;
Benefits:
- Loose coupling
- Easier testing
- Better maintainability
Q: Difference between Spring and Spring Boot?
Spring requires manual configuration while Spring Boot provides auto configuration.
Spring Boot reduces boilerplate code and simplifies setup.
Example:
In Spring Boot, embedded Tomcat comes automatically.
Q: What is Hibernate?
Hibernate is an ORM framework.
ORM means Object Relational Mapping used to map Java objects with database tables.
It converts Java objects into database tables automatically.
Advantages:
- Reduces SQL code
- Faster development
- Better maintainability
Q: What is JPA?( Java Persistence API)
JPA is a specification for ORM.
Hibernate is one implementation of JPA.
JPA provides annotations like:
@Entity
@Table
@Id
Q: What is REST API?
A: REST API allows communication between frontend and backend using HTTP methods.
Collection FrameWork
“A set of ready-made classes used to store multiple values easily.”
Quick examples:
List → keeps items in order
Set → stores unique items
Map → stores key-value pairs
You can explain it in interviews like:
“The Collection Framework in Java provides classes and interfaces to store, retrieve, and
manipulate data efficiently.”
2. Important Spring Boot Annotations
@SpringBootApplication → Main Spring Boot application annotation.
@RestController → Used for REST APIs.
@Controller → Used for JSP/MVC applications.
@Service → Business logic layer.
@Repository → Database layer.
@Autowired → Dependency Injection.
@RequestMapping → Maps HTTP requests.
@GetMapping / @PostMapping → Handle GET and POST APIs.
@RequestParam
Used to get values from query parameters.
@PathVariable
Used to get values from the URL path.
@Param
It is used to pass parameters into JPQL or SQL queries.
@Transactional → Manages database transactions.
@Component → Generic Spring managed bean.
@Value → Reads properties from [Link].
Difference Between JPQL and SQL Queries
Feature JPQL (Java Persistence Query Language) SQL (Structured Query Language)
Works On Java Entity Classes Database Tables
Uses Entity names & object fields Table names & column names
3. Spring Security in Banking Application
Spring Security is used to secure banking applications by handling:
- Authentication (Login validation)
- Authorization (Role based access)
- Session management
- Password encryption
- API security
Real Banking Usage:
- Customer login security
- Maker-Checker authorization
- Role-based access (Admin/User/Checker)
- Prevent unauthorized transaction access
- Secure APIs using JWT
Example:
Only users with ROLE_ADMIN can approve high value RTGS transactions.
4. JWT (JSON Web Token)
JWT is used for secure authentication between frontend and backend.
Flow:
1. User logs in using username/password.
2. Backend validates credentials.
3. JWT token is generated.
4. Token is sent to frontend.
5. Frontend sends token in every API request.
6. Backend validates token before processing request.
Advantages:
- Stateless authentication
- More secure
- Faster API validation
- Used in microservices
JWT Structure:
[Link]
Banking Application Usage:
- Secure mobile banking APIs
- Internet banking authentication
- Token-based authorization
- Prevent unauthorized API access
The company is using Session-Based Authentication ,once user login into applcaiton User
session is maintained on server. We use SHA-256 hashing for password [Link] Single
session tracking. Audit Logging / Security Monitoring
application is a banking payment processing system used for generating NEFT,RTGS ISO
payment messages which are RBI-compliant XML formats - pacs.008, pacs.009
XML Schema Definition-XSD
After generating pacs.008 XML messages, we validate them against XSD schemas provided
as per RBI/ISO standards.
Difference Between NEFT and LC/BG
NEFT LC/BG
Uses SWIFT MT
Uses ISO 20022 XML
format
MT700/MT760
pacs.008 messages
messages
Domestic payments Trade finance
RBI systems SWIFT network
From banks
Appsec points
Prevents Cross-Site Scripting (XSS) attacks.
4. SQL Interview Questions
Q: Difference between DELETE, TRUNCATE, and DROP?
DELETE:
Removes selected rows and supports rollback.
TRUNCATE:
Removes all rows quickly and does not support rollback.
DROP:
Deletes entire table structure.
Q: What are Joins?
Joins combine data from multiple tables.
Types:
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- FULL JOIN
Example:
Fetching employee details with department information.
Q: What is Normalization?
Normalization organizes database tables to reduce redundancy.
Types:
1NF
2NF
3NF
Benefits:
- Reduces duplicate data
- Improves database efficiency
5. Resume Based Questions
Q: Explain your migration project.
We migrated a legacy Apache Struts application running on JDK 7 and Tomcat 7 to Spring
MVC with JDK 17 and Tomcat 10.
Challenges:
- Deprecated APIs
- Compatibility issues
- Old architecture
Benefits after migration:
- Better performance
- Improved security
- Easier maintenance
- Modern architecture support
Q: Explain Maker-Checker workflow.
Maker-Checker is a banking authorization process.
Flow:
1. Maker creates transaction.
2. Checker verifies transaction.
3. Authorizer approves transaction.
This process improves security and prevents fraud.
Q: Difference between NEFT and RTGS?
NEFT:
- Batch processing
- No minimum amount
- Slight delay
RTGS:
- Real time transfer
- Used for high value transactions
- Faster settlement
Q: Explain one production issue you solved.
One production issue involved API failure due to null values from frontend.
Steps taken:
1. Checked logs
2. Identified root cause
3. Added validation handling
4. Fixed backend logic
5. Deployed patch
Result:
Application stability improved and downtime reduced.
6. HR Interview Questions
Q: Why do you want to change your job?
I am looking for better growth opportunities, exposure to scalable systems, and
opportunities to improve my technical skills.
Q: What are your strengths?
My strengths are problem solving, debugging production issues, quick learning, and taking
ownership of tasks.
Q: Where do you see yourself in 5 years?
I want to become a strong backend/full stack developer and work on large scale enterprise
applications.
7. Coding Questions to Practice
Reverse String
Palindrome Number
Prime Number
Fibonacci Series
Sort Array
Find Duplicate Elements
Factorial Program
Count Characters using HashMap
8. Final Interview Tips
Explain projects confidently.
Prepare backend flow properly.
Revise Java Collections and Exception Handling.
Revise Spring Boot annotations.
Practice SQL joins and queries.
Prepare 2 production support stories.
Practice coding questions daily.