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
How do you sort in java?
What is integer parseint?
What is balanced tree in java?
Explain how to convert any java object into byte array.
Is there any difference between nested classes and inner classes?
What are the files generated after using IDL to java compiler?
What is a Presistent Object?
Explain Basics of OOP Language in java
What are some examples of variable costs?
Difference between default and protected access specifiers?
Can we clone singleton class in java?
What does 3 dots mean in java?
Explain inheritance in java?
which is advanced deep technology in java launched by the sun microsystem??? The answer is very logical If u need correct answer mail me at priya_gupta@gmail.com
Can you override static methods?