Java Project Interview Questions and Answers

Questions

  1. Can you give a high-level overview of your current project?
  2. What is your role and main responsibilities in the project?
  3. How does your project contribute to business objectives?
  4. Can you describe the tech stack used in your project?
  5. What methodologies (Agile, Scrum, Kanban, Waterfall) are followed in your project?
  6. What is the architecture of your project (Monolithic, Microservices, Serverless)?
  7. Why did you choose Microservices over a Monolithic architecture?
  8. Can you explain your project architecture?
  9. What are your daily activities as a full stack Developer?
  10. What was the most challenging part of your project?

 

Questions & Answers

  1. Can you give a high-level overview of your current project?

I am currently working on the Saudi Public Transport Company (SAPTCO) project, which provides online services for ticketing and reservations. The application allows customers to book trips, view reservations, and print tickets. It ensures seamless bus transportation across Saudi Arabia, connecting major cities and towns. The system is built using Spring Boot-based Microservices to handle different functionalities such as user management, ticket booking, and trip scheduling while ensuring high scalability and reliability.

 

  1. What is your role and main responsibilities in the project?

I am working as a Full Stack Java Developer, contributing to both backend and frontend development. My key responsibilities include:

  • Developing Microservices using Spring Boot and integrating them with REST APIs.
  • Building RESTful APIs for ticket booking, reservation, and user management.
  • Implementing Cloud Gateway, Eureka Server, and Eureka Clients for service discovery and load balancing.
  • Working with JPA and Hibernate for database interactions with MySQL.
  • Enhancing performance using Java 8 features like Streams and Lambda expressions.
  • Debugging and monitoring logs using Log4j2.
  • Implementing API response handling using Builder Design Pattern.
  • Developing the frontend using Angular and handling API integrations.

 

  1. How does your project contribute to business objectives?

The SAPTCO project is critical for digital transformation in the Saudi transportation sector. It enables:

  • Seamless online ticket booking and payments, reducing the dependency on offline ticket counters.
  • Better customer experience with real-time reservation status and printable tickets.
  • Operational efficiency by managing bus schedules and optimizing routes.
  • Regulatory compliance by ensuring that travelers carry valid ID proofs.
  • Improved transparency between customers and SAPTCO with real-time data access.

Overall, the project increases revenue, customer satisfaction, and operational efficiency for SAPTCO.

 

  1. Can you describe the tech stack used in your project?

The SAPTCO application is built on a modern technology stack, including:

 Backend: Java 8, Spring Boot, Microservices, REST APIs
 Frontend: Angular, HTML, CSS
 Database: MySQL (using JPA, Hibernate)
 Logging & Monitoring: Log4j2, Actuators
 API Gateway & Service Discovery: Spring Cloud Gateway, Eureka Server
 Build & Deployment: Maven, Git
 Testing & Debugging: Postman for API testing

This stack ensures scalability, maintainability, and security for the application.

 

  1. What methodologies (Agile, Scrum, Kanban, Waterfall) are followed in your project?

We follow the Agile methodology with Scrum practices. This includes:

  • Daily stand-up meetings to discuss progress and blockers.
  • Sprint planning every two weeks to define tasks and deliverables.
  • Sprint retrospectives to improve the development process.
  • JIRA for tracking issues and managing sprint backlogs.

This approach allows us to deliver features incrementally, adapt to changing requirements, and ensure continuous improvement.

 

  1. What is the architecture of your project (Monolithic, Microservices, Serverless)?

The SAPTCO project follows a Microservices Architecture. Each functionality (e.g., ticket booking, user management, payment processing) is built as an independent Spring Boot microservice, allowing for scalability, flexibility, and maintainability.

  • API Gateway (Spring Cloud Gateway) manages requests from clients.
  • Eureka Server handles service discovery.
  • Each microservice is independently deployed and communicates via REST APIs.
  • MySQL Database is used for data persistence.
  • Log4j2 and Actuators are used for monitoring.
  • Angular is used for the frontend, interacting with backend services.

 

Architecture Diagram:

Here is the high-level Microservices Architecture diagram for your SAPTCO Project.

Architecture Breakdown:

  1. Client Layer (Angular, HTML, CSS) – Users interact via web or mobile apps.
  2. API Gateway (Spring Cloud Gateway) – Handles authentication, request routing, and load balancing.
  3. Microservices Layer:
    • User Service (Manages user authentication & profiles)
    • Booking Service (Handles ticket reservations)
    • Payment Service (Processes transactions)
  4. Service Discovery (Eureka Server) – Enables dynamic service registration and discovery.
  5. Database Layer (MySQL) – Stores user, booking, and transaction details.
  6. Logging & Monitoring (Log4J2, Actuators) – Tracks logs and performance metrics.

This architecture ensures scalability, fault tolerance, and independent deployment of services.

:

  1. Why did you choose Microservices over a Monolithic architecture?

We chose Microservices over a Monolithic architecture for several reasons:

  • Scalability: Each service (User, Booking, Payment, etc.) can be independently scaled based on demand.
  • Flexibility in Tech Stack: We can use different technologies for different services (e.g., MySQL for payments, NoSQL for logs).
  • Faster Development & Deployment: Microservices allow independent deployment without affecting other services.
  • Fault Isolation: If one service fails (e.g., Payment Service), it does not bring down the entire application.
  • Better Maintainability: Small, modular services are easier to understand, modify, and test.
  • Cloud-native & DevOps Friendly: Supports containerization (Docker, Kubernetes) and CI/CD pipelines for automated deployment.
  1. Can you explain your project architecture?

Our project follows a Microservices Architecture, where different business functionalities are split into independent services.

Key Components:

  1. Client Layer (Angular, HTML, CSS)
    • Users interact via the web application.
  2. API Gateway (Spring Cloud Gateway)
    • Acts as an entry point for all client requests.
    • Handles authentication, load balancing, and request routing.
  3. Microservices Layer (Spring Boot + REST API)
    • User Service: Manages authentication & user profiles.
    • Booking Service: Handles bus ticket reservations.
    • Payment Service: Manages transactions & payment gateway integration.
  4. Service Discovery (Eureka Server)
    • Enables dynamic service registration and discovery.
  5. Database Layer
    • MySQL stores user, booking, and payment data.
  6. Logging & Monitoring (Log4J2, Actuators)
    • Tracks logs and application health.
  7. Security (Spring Security, OAuth, JWT)
    • Ensures secure communication between services.

This architecture enables high availability, scalability, and modularity while ensuring smooth user experience.

 

  1. What are your daily activities as a Full Stack Developer?

As a Full Stack Java Developer, my daily activities include:

  • Requirement Analysis: Understanding business needs and breaking them into technical tasks.
  • Backend Development:
    • Developing REST APIs using Spring Boot.
    • Implementing business logic, database queries, and security mechanisms.
    • Managing API performance & optimization.
  • Frontend Development:
    • Creating UI components using Angular.
    • Implementing form validations and API integrations.
  • Database Management: Writing optimized SQL queries (CRUD operations, joins, indexing).
  • Bug Fixing & Debugging: Using Postman, Log4J2, and JIRA to track and fix issues.
  • Code Reviews & Git Management: Ensuring high-quality code using Git for version control.
  • CI/CD & Deployment: Managing builds and deployments using Jenkins, Docker, and Kubernetes.
  • Team Collaboration: Attending daily stand-up meetings (Scrum methodology).

 

  1. What was the most challenging part of your project?

One of the biggest challenges was ensuring high availability and performance while handling a large number of user requests.

Challenges & Solutions:

  1. Handling High Traffic Load
    • Challenge: During peak hours, booking requests caused slow responses.
    • Solution: Used Load Balancers & Auto-Scaling (AWS EC2, Kubernetes) to dynamically manage traffic.
  2. Ensuring Secure Transactions
    • Challenge: Implementing a secure payment processing system.
    • Solution: Used OAuth, JWT, HTTPS, and role-based access control (RBAC) to enhance security.
  3. Microservices Communication
    • Challenge: Managing API calls between multiple microservices without performance loss.
    • Solution: Used Resilience4J for circuit breaking, and Kafka for async communication.
  4. Database Optimization
    • Challenge: Slow query execution due to a large volume of records.
    • Solution: Used Indexing, Query Optimization, and Caching (Redis) to reduce latency.
  5. CI/CD & Deployment Challenges
    • Challenge: Automating deployment across different environments (Dev, QA, Prod).
    • Solution: Implemented CI/CD pipelines using Jenkins, Docker, and Kubernetes.