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 / seven hills

true
false


because the value of Integer object should not be greater than 127...if u put<127 then always true

Is This Answer Correct ?    23 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is final class?

764


Can static methods access instance variables in java?

770


What is a functional interface?

734


Explain the selection sort algorithm?

838


Explain the importance of import keyword in java?

766


Are primitives objects?

772


Why we used break and continue statement in java?

768


What is a superclass?

1105


Can we override tostring method in java?

710


What does index mean in java?

722


How many digits can a float hold?

734


Is java a pure object oriented language?

719


How you can force the garbage collection?

727


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

757


Does importing a package imports its sub-packages as well in java?

737