What Is Class And Object In OOP?
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people's questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Pallavi Kamat
Class in Object Oriented Programming (OOP) is like a blueprint for an object. We define the basic structure of an object in the class. The behavior of object is also defined in a class.
Object is created using the class. We pass values using the object which then behave in the way that the class is designed.
For example a class with the name animal may have methods like hands(), legs(), tail() defined.
An object with the name dog can be created and referenced to class animal. Now the object dog can use the methods of class animal as its behavior.