public class Test
{
public static void main(String ar[])
{
Integer a = 10;
Integer b =10;
Integer c = 145;
Integer d = 145;
System.out.println(a==b);
System.out.println(c==d);
}
}
Answer Posted / prashanth
true
false
The Buffer size of Integer class is -128 to 127
Except this range in all remaining cases a new object will be created.
Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Is a char always 1 byte?
How many types of design patterns are there?
How do you know if a value is nan?
What is the difference between an object-oriented programming language and object-based programming language?
What is difference between static and final?
What are the 2 types of java programs?
What are dot operator queries?
Can a class with private constructor be extended?
How do you add an element to a set in java?
Can we override static methods in java?
What is the difference between normal report & matrix report?
What is constructor chaining in java?
What does int [] mean in java?
What is null data type?
What is the meaning of variables in research?