Interview Prepration
Interview Prepration
"Hello, my name is Sushant Hirave and I'm originally from Kolhapur. Currently living in
Pune. I pursued my Bachelor's degree in Mechanical Engineering from SKN Sinhgad
Institute of Technology, Lonavala. After that, I completed a Postgraduate diploma in
CDAC where I learnt Java programming language along with MySQL & ReactJs. In my
free time, I enjoy reading and expanding my knowledge on various topics. I'm a
passionate about finding creative solutions to complex problems. I believe in
continuously learning and developing new skills to improve myself both personally
and professionally."
1.Object
Any entity that has state and behaviour is known as an object. For example, a chair,
pen, table, keyboard, bike, etc. It can be physical or logical.
Example: A dog is an object because it has states like color, name, breed, etc. as well
as behaviors like wagging the tail, barking, eating, etc.
2.Class
Collection of objects is called class. It is a logical entity.
A class can also be defined as a blueprint from which you can create an individual
object. Class doesn't consume any space.
3.Inheritance
When one object acquires all the properties and behaviors of a parent object, it is known
as inheritance. It provides code reusability. It is used to achieve runtime polymorphism.
4.Polymorphism
If one task is performed in different ways, it is known as polymorphism. For example: to
convince the customer differently, to draw something, for example, shape, triangle,
rectangle, etc.
In Java, we use method overloading and method overriding to achieve polymorphism.
Another example can be to speak something; for example, a cat speaks meow, dog
barks woof, etc.
5.Abstraction
Hiding internal details and showing functionality is known as abstraction. For example
phone call, we don't know the internal processing.
6.Encapsulation
Binding (or wrapping) code and data together into a single unit are known as
encapsulation. For example, a capsule, it is wrapped with different medicines.
A java class is the example of encapsulation. Java bean is the fully encapsulated class
because all the data members are private here.
GET:
POST:
PUT:
Request Request
Method Purpose Body Idempotent Caching
In a REST API, each resource is identified by a unique URI (Uniform Resource Identifier)
and is accessed using a set of standard HTTP methods such as GET, POST, PUT, and
DELETE.
1. Stateless: Each request sent from a client to the server must contain all the
necessary information for the server to understand and process the request.
The server should not store any client context.
2. Client-Server Architecture: The client and server are separated and interact with
each other through a uniform interface.
3. Cacheable: The server response must explicitly indicate whether the response
can be cached or not.
4. Layered System: A client can interact with a RESTful API through an
intermediary, such as a load balancer, without knowing the details of the
intermediary.
5. Uniform Interface: A set of standard HTTP methods such as GET, POST, PUT,
DELETE should be used to access resources. Resources should be identified by
URIs, and the responses should be in a standard format, such as JSON or XML.
RESTful APIs are widely used in web applications, mobile applications, and other client-
server interactions because of their simplicity, scalability, and flexibility.
Question
Input: helloworld
output : Hello
Answer: