Skip to content

Instantly share code, notes, and snippets.

@canokay
Last active November 15, 2018 08:26
Show Gist options
  • Save canokay/507e033c07ec11be4de5e0a29b85ea5b to your computer and use it in GitHub Desktop.
Save canokay/507e033c07ec11be4de5e0a29b85ea5b to your computer and use it in GitHub Desktop.
Java Equals Example
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