what is the difference between object and class
Answers were Sorted based on User's Feedback
Answer / prema
Class is a template or a plan for creating objects.
For example: For construction of building we need a plan.
Without plan we can't construct building. Here plan acts as
class. Building acts as object.Using the same plan we can
build any number of building.
In the same way we can create any number of objects for the
same class.Class tell whats the object state and behaviour.
Basically class tells what the object should have.
Object is an real world entity, which has something and
which know something. It means ojects has state and
behaviour.State of the object is represented by instance
variable. Behaviours are representd by methods.
| Is This Answer Correct ? | 24 Yes | 2 No |
Answer / manasa
class is a blueprint of an object
object is a run time entity
class consists of methods n statements
| Is This Answer Correct ? | 11 Yes | 2 No |
Answer / sreekanth reddy
object is physical existance and class is the logical existance
| Is This Answer Correct ? | 6 Yes | 5 No |
Object is a instance of a class.
Class is a template for an object.
Example: suppose we are going to hotel.first we will check
the menu. Menu is a class. we can select the one item from
menu. item is a method or variable. how to select the item.
we can create the object of menu. That is instance of
menu(Object).
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / gv praveen kumar
class is a process of binding data members and methods in a single unit,that unit is known as class.and class variables is known as object.
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / hong
What kind of members they can refer to:
Class - only static members;
Object - all members.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / prashanth
Class is an user defined type and objects are its types.
If car is a class different types of cars are its objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / manish
Group of Similar type thigs comes under the class.
Eg: Suppose if we are talking about the Car, then There are many companies who makes Cars. And suddenly you see any car so that car is object of type car class.
or we can say class is blueprint,prototype or data type..
and object is buffer..
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / praveen
--- Object is physically exist but class doesn't exist
physically.
Ex: Object: rose, Lilly.
Class : Flowers
| Is This Answer Correct ? | 2 Yes | 5 No |
Answer / rakesh verma
object is any real thing,just like employ is object and
person is class.
class is instance of class.
| Is This Answer Correct ? | 4 Yes | 26 No |
can we override the main() method in java????
3 Answers Vimukti Technologies,
What is the internal implementation of set in java?
Explain the difference between abstract class and interface in java?
What are synchronized blocks in java?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is the maximum size of arraylist in java?
What is the purpose of lambda expressions?
Explain the hierarchy of java exception classes?
What is the difference between JDK and JVM?
What are variable names?
1) There are 10 different threads in runnable state. Each having priority 1 to 10. How does the CPU schedules or executes these threads?
Which is the best sorting technique in java?