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

Explain illegalmonitorstateexception and when it will be thrown?

602


What are packages in java?

554


Why string is called as immutable?

518


How do you control extraneous variables?

495


What do u mean by variable?

559






Is 0 true or is 1 true?

512


Why set do not allow duplicates in java?

571


What is the unit of plancks constant?

560


What is the synonym of procedure?

522


How do you remove spaces in java?

527


Can java arraylist hold different types?

484


Is map ordered in java?

527


Can a boolean be null java?

534


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1529


What is keyword in oop?

510