I am doing some match functions with the Java. I have some string like this park,reserved_parking etc.. If i search for the word park like this
if(input.trim().contains ("Park"))
dummies = dummies + " 1";
else
dummies = dummies + " 0";
It prints the values for reserved_parking also. I don't know how to find the exact match in Java. any help will be appreciated.
input.trim().equals("Park")?containsis doing its work, but your need is different.