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
Explain about abstraction?
What is meant by function overloading and function overriding?
Is is possible to define our own functional interface?
How many instances can be created for an abstract class?
Can you create an instance of an abstract class?
What is super keyword?
what three "domains" are considered during analysis modeling?
What is the difference between an abstract class and interface in java?
What do you mean by "explicitly implemeting an interface". Give an example?
Explain what is an object?
Difference between abstraction and implementation hiding ?
What are the basic concepts of oop?
Whether static method can use nonstatic members?
What is a final variable?
What are sealed modifiers?