OOPs Concept in Java
OOPs Concept in Java
Topperworld.in
results.
Object
Class
Abstraction
Inheritance
Polymorphism
Encapsulation
Java Programming
Object :
Any entity that has state and behavior is known as an
object. For example, a chair, pen, table, keyboard, bike, etc. It can be
physical or logical.
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.
Inheritance :
class is derived from an existing class. The new class is called the
subclass, and the existing class is called the superclass. The subclass
Polymorphism :
Abstraction :
Abstraction means hiding the implementation
details of a class and exposing only the necessary details to the user. In
Java, abstraction can be achieved through abstract classes and interfaces.
Encapsulation :
Encapsulation means wrapping up the data
and methods into a single unit. In Java, encapsulation can be achieved
through access modifiers such as private, protected, and public.
These concepts are the pillars of OOP’s in Java we will Discuss these
in Detail seperately.
Java Programming