What is the difference(or similarity if there are some)
between object and a variable?
Answer Posted / udayasri
Variable: Variable is a value which is change during the run
time of the program, and it allocates the memory space for
the particular data type which we mention as var = "something"
Object: Object is the blue print of the class i.e. it shows
the behavior of the class. It creates memory for that whole
class and even class is refer by this object only.
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What is a function in programming?
Is object a data type?
What is the synchronized method modifier?
When will we prefer to use set and list in java and why?
What is sorting algorithm in java?
Can extern variables be initialized?
What is the size of integer?
What is the difference between a vector & an array list?
Explain when classnotfoundexception will be raised ?
What does %4d mean in java?
Which is easier netbeans or eclipse?
can java object be locked down for exclusive use by a given thread? Or what happens when a thread cannot acquire a lock on an object? : Java thread
Why Set interface contains unique elements, what internally implemented for this so that it contains unique elements?
Explain all java features with real time examples
What is console based application in java?