I would like to know what is wrong with the following code.
public void onClickSave (View cs)
{
Pattern pattern = Pattern.compile("@");
Matcher matcher = pattern.matcher(userid);
boolean found = matcher.find();
if(found){
//do stuff
So the objective is to check the string for an @ symbol. Not sure what I’m missing new to Java. Thanks for any help
why you dont try to use the contains method ?
But this is also working for me: