What will the following code print ?<br /> <br /> Integer a = 100, b =100;<br /> Integer c = 1000, d = 1000;<br /> System.out.println(a == b);<br /> System.out.println(c ==d);
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. What will the following code print ?

Integer a = 100, b =100;
Integer c = 1000, d = 1000;
System.out.println(a == b);
System.out.println(c ==d);
Core Java
Ans. false
false

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     object equality  code  coding        frequent


Related Questions

  Difference between == and .equals() ?
  Why is null == null returns true ?
 What is the difference between = and == in Java ?
 How is == operator different for objects and primitive types ?
 What will be the output of following code

Integer x = 1;
Integer y = 2;
System.out.println(x == y);

What if you change 1 to "1" and Integer to String?
 How can we check equality for Arrays in Java ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: