What is the difference(or similarity if there are some)
between object and a variable?
Answer Posted / dipty
A variable can hold asingle type of variable at a time..but an object can hold a number of variables of different type.
int a = 4; // a would be the variable
Car b = new Car();// b is an object
b.carGo();// this is an method in the object car created below.
class Car()
{
void carGo()
{
car moves;
}
}
Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
Define jit compiler?
What is blank final variable?
What is the difference between stringbuffer and stringbuilder?
What are the differences between path and classpath variables?
How to connect to a remote database using Applet?
Can there be an abstract method without an abstract class?
Which data type is a class in java?
How do you sort an array in java?
Is null an object in java?
What is the purpose of an interface?
What's a method in programming?
How do you bind variables?
What is try-with-resources in java?
Can a main method be declared final?
What are the main differences between the java platform and other platforms?