Created
June 5, 2021 14:13
-
-
Save MrRahulR/b15182e2ca82b5d550a1eda51afaaf90 to your computer and use it in GitHub Desktop.
StringEquals
This file contains 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 StringEquals { | |
public static void main(String[] args) { | |
String string1 = "Hello "; | |
String string2 = "hello "; | |
String string3 = "Hello "; | |
System.out.println(string1.equals(string2)); // returns false | |
System.out.println(string1.equals(string3)); // returns true | |
} | |
} | |
/* | |
Output : | |
false | |
true | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment