Last active
November 15, 2018 08:26
-
-
Save canokay/507e033c07ec11be4de5e0a29b85ea5b to your computer and use it in GitHub Desktop.
Java Equals Example
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 EqualsExample { | |
public static void main(String[] args){ | |
String yazi = "Merhaba Can Okay"; | |
Boolean durum1= yazi.equals("Merhaba Can Okay"); // true | |
System.out.println(durum1); | |
Boolean durum2 = yazi.equals("merhaba can okay"); //false | |
System.out.println(durum2); | |
Boolean durum3 = yazi.equalsIgnoreCase("merhaba can okay");//true | |
System.out.println(durum3); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment