Created
July 8, 2019 20:23
-
-
Save gbajaj/9a9cb204e95d8d31b287d3491a444d39 to your computer and use it in GitHub Desktop.
Compare Integers with Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Integer a = new Integer(10); | |
Integer b= new Integer(10); | |
if (a == b) { | |
System.out.println("true"); | |
} else { | |
System.out.println("false"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment