Answer Posted / murthy
A class is neither an object nor an object is a class.
A class is like a blue print for an object.
An object is an instance of a class.
Some people have given the right examples above and some
more goes here:
You can consider a blue print for your house is a class.
You cannot stay in blue print :).
The building built based on the blue print is called an
object. You can stay in it.
Class should be treated like a "data type" and an object
like a instance of that datatype.
for e.g., int i; you can considet int as a class and i as
an instance of an object.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do you prevent a class from being inherited by another class?
what is virtual function and pure virtual function ?
Differentiate between a class and a method.
Explain about inheritance in oops?
What is the function of dynamic typing?
What's the benefit of using inheritance?
Does PowerShell support OOPs?
When will you use an interface and abstract class?
Explain what an object is.
What is diamond inheritance problem? How java 8 solves this problem?
Which OOPS concept exposes only the necessary information to the calling functions?
What's the main difference between arraylist / hashmap and vector / hashtable?
What is Abstract method and how different from Virtual Method?
Explain colloboration
What is the syntax of object oriented method call?