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
What is difference between word and integer?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
Can a constructor be made final?
Do you know why doesn't the java library use a randomized version of quicksort?
Can we compare two strings in java?
What are the differences between abstract class and interface?
What is pangram in java?
What is string english?
What is the final access modifier in java?
What is the difference between stringbuffer and stringbuilder?
Why do we need wrapper classes?
What are the two ways of implementing multi-threading in java?
Can an interface have a constructor?
When does an object becomes eligible for garbage collection in java?
What is hash table in java?