0
Why the Boolean operation result false?
I use regex split method and use the result to match the word but the result always false even it's the same word https://code.sololearn.com/c2Ji7Fj4t9K5/?ref=app
1 Answer
+ 1
To compare a string u should use
String.equals(String) ;
from your Code
System.out.println(word[0].equals( "Java"));