I want to find out if a string is a precise word, but for example if I do it this way:
String s1="Welcome";
String s ="Welcomes to Tutorialspoint.com";
System.out.println(s.contains(s1));
It returns true, but I want you to give me back false, because in the variable s
with the word Welcomes
and not the word Welcome
of s1
.
How do I proceed?