Is class an Object? Is object a class?

Answer Posted / shambhu gupta

Class is a user defined data type whereas Object can be
veiwed as a variable of class type
For example fruit is a class & mango,apple are different
objects of class fruit.
Class can be a person whereas objects can be any existing
person like Ram ,Shayam,Rahul etc

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a virtual method and an abstract method?

710


How does abstraction differ from encapsulation.

747


Write about abstract base classes?

783


Are constructors inherited? Can a subclass call the parent's class constructor? When?

751


Explain what is single and multiple inheritance?

737


What are extrinsic and intrinsic connections in object-oriented programming?

720


What is operator overloading and polymorphism?

752


Do we require a parameter for constructors?

751


Explain about encapsulation?

760


What is the main difference between overloading and overriding?

773


Can encapsulation be called as a security device?

727


What is an interface?

761


Can a function be overloaded based on return types?

692


What is the difference between an Abstract class and Interface?

790


What is a try/ catch block?

728