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 do you mean by inner class in java? Explain

697


What do you mean by collectors in java 8?

619


Why string is not thread safe?

657


What state is a thread in when it is executing?

616


What is stream api in java8?

631






What is the use of default method in interface in java? Explain

625


what is a working thread? : Java thread

658


Why main method is called first in java?

621


Can we split string with in java?

635


Can an interface extend a class?

626


What is the core java?

628


Is string a datatype?

640


Is there any limitation of using inheritance?

658


How many types of design patterns are there?

633


What is class array in java?

610