+ 3
equals() methode
someone please explain what's equals() methode for ?
3 odpowiedzi
+ 10
//Compares String value
String str = "hello";
if(str.equals("hello"){System.out.println("hey");}
//You can also use this method if you want to ignore case sensitive inputs.
if(str.equalsIgnoreCase("HELLO"){System.out.println("Hey");}
+ 8
see @Serena's answer
https://www.sololearn.com/Discuss/647021/?ref=app
+ 4
Thank you David, pretty much clear