OOPs Concept - 1

Java is an object oriented programming language which means it supports OOPs concepts. In this post I am going to discuss OOPs concepts which will help you not only in Java but in other OOPs and OOPs based languages.

Basic OOPs concepts are as follow :
1. Class
2. Object
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation

Now we will discuss these concepts one by one.

Class

It is a logical entity which groups common feature and behavior of different entities.It is the blueprint, or plan, or template, that describes the details of an object.Class doesn't actually define any data, but it does define what the class name means, that is, what an object of the class will consist of and what operations can be performed on such an object.

Class is composed of three things: a name, attributes (properties), and operations.

See OOPs Concept - 1(Practicals)  for coding perspective of class.


Object

An object can be considered a thing that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the Hand(object) can grip something, or a Student(object) can give their name or address.
In pure OOP terms an object is an instance of a class.

An Object is composed of three things : identity, state and behavior.

Identity is that attribute of Object which differentiate between two unique objects. For example student's roll number.

State represents what are current values present in object's attributes.

Behavior defines what operations can be performed on that object.

For practicals on these topics you can visit on : OOPs Concept - 1(Practicals)
Share:

1 comment:

Popular Posts

Recent Posts

Followers

Total Pageviews