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

What is the program development process?

569


What is boolean law?

522


What is anagram number?

458


What is the difference between instanceof and isinstance?

571


What is string intern in java?

558






How do you sort words in java?

538


What do you understand by overloading and overriding in java?

550


What is string buffer?

509


What is the difference between hashmap and hashtable in java?

561


If system.exit (0); is written at the end of the try block, will the finally block still execute?

625


What is the difference between state-based unit testing and interaction-based unit testing?

498


what is encapsulation in java? Explain

669


Can we write method inside a method in java?

531


What are advantages of using Java?s layout managers than windowing systems?

1868


How to set the permissions to a file in java?

542