Developers Question
Developers Question
Answer: OOP is a programming paradigm based on the concept of objects that contain both data and methods. Key
principles include Encapsulation, Abstraction, Inheritance, and Polymorphism.
Answer:
Answer: An abstract class can have both abstract and concrete methods, whereas an interface contains only abstract
methods (until Java 8, which introduced default methods).
Answer: REST API (Representational State Transfer) is an architectural style for designing networked applications
using HTTP methods such as GET, POST, PUT, and DELETE.
Answer: SQL databases are relational and use structured schema (tables), while NoSQL databases are non-relational,
offering flexibility with document, key-value, graph, or column-family data models.
Answer: HTTPS is a secure version of HTTP, using SSL/TLS encryption to protect data during transmission.
Answer: Dependency Injection (DI) is a design pattern where dependencies are injected into a class rather than the
class creating them. Spring Framework supports DI using annotations like @Autowired.
Answer: JVM is an abstract machine that enables Java bytecode execution, providing platform independence and
features like garbage collection and Just-In-Time (JIT) compilation.
Answer:
• final - Used to declare constants, prevent method overriding, and class inheritance.
• finalize - A method in Object class called by the garbage collector before an object is destroyed.
Answer: Stack memory stores method execution details and local variables, while Heap memory is used for objects
and class instances.
12. What is the difference between GET and POST methods in HTTP?
Answer: GET retrieves data from a server, while POST sends data to the server for processing.
Answer: Singleton ensures that a class has only one instance and provides a global access point to that instance.
Answer: An immutable object’s state cannot be changed after its creation. Example: String class in Java.
Answer: Garbage Collection (GC) automatically deallocates memory by removing unreachable objects.
Answer: A process is an independent execution unit, while a thread is a lightweight subprocess that shares the
process resources.
Answer: A deadlock occurs when two or more threads wait indefinitely for each other to release resources.
Answer: It acts as a single entry point for client requests, routing them to appropriate microservices, handling
authentication, logging, and request aggregation.
Answer: Spring Boot is a framework for building production-ready Spring applications with minimal configuration.
Answer: Docker is a platform that enables containerization, making applications portable and consistent across
environments.
Answer: Kubernetes is an open-source container orchestration tool that automates deployment, scaling, and
management of containerized applications.
Answer: CI/CD (Continuous Integration/Continuous Deployment) automates software testing and deployment to
improve development efficiency.
Answer: Agile is an iterative approach to software development that focuses on customer feedback, flexibility, and
incremental deliveries.
24. What is the difference between unit testing and integration testing?
Answer: Unit testing checks individual components, while integration testing ensures combined components work
together correctly.
Answer: The Factory Pattern is a creational design pattern that provides an interface for creating objects without
specifying their concrete classes.
Answer: Proxy Pattern acts as an intermediary for another object to control access, manage security, or add extra
functionality.
Answer: Observer Pattern is a behavioral design pattern where multiple objects listen for changes in another object
and update accordingly.
Answer: A monolithic architecture has all components combined into a single unit, while microservices break the
application into independent services.
Answer: Lambda expressions provide a concise way to implement functional interfaces using the -> syntax.
Answer: The volatile keyword ensures visibility of changes to variables across threads, preventing caching issues.
Answer: SOLID principles guide software design to make it more maintainable and scalable:
Answer: Load balancing distributes incoming network traffic across multiple servers to improve efficiency and
prevent overload.
Answer: The Circuit Breaker pattern prevents repeated failures by halting requests to a failing service for a defined
period.
Answer: JWT is a secure token format used for authentication and information exchange between clients and
servers.