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


Please Help Members By Posting Answers For Below Questions

Is a char always 1 byte?

708


How many types of design patterns are there?

768


How do you know if a value is nan?

786


What is the difference between an object-oriented programming language and object-based programming language?

757


What is difference between static and final?

748


What are the 2 types of java programs?

776


What are dot operator queries?

845


Can a class with private constructor be extended?

682


How do you add an element to a set in java?

753


Can we override static methods in java?

797


What is the difference between normal report & matrix report?

794


What is constructor chaining in java?

809


What does int [] mean in java?

747


What is null data type?

708


What is the meaning of variables in research?

752