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


Please Help Members By Posting Answers For Below Questions

How to perform linear search in java?

568


What do the thread?class methods run() and start() do?

545


What is the private method modifier?

582


What is meant by call by reference?

511


How do you detect memory leaks?

584






What are mutable classes?

525


How do you add an element to an arraylist in java?

489


What is string and example?

557


When will you define a method as static in Java?

574


Why is java so popular?

639


What is a singleton class? Give a practical example of its usage.

591


what is difference betweem home interface and remote interface?

2119


Write code to implement bubble sort in java?

560


What is locale?

608


Are global variables initialized to zero?

511