I want to match an exact string
in an ArrayList<String>
.
Currently this code will execute if myArrayList.contains(wordImLookingFor)
.
if (myArrayList.contains(exactWordImLookingFor)) {
Toast.makeText(getApplicationContext(), "Match", Toast.LENGTH_SHORT).show();
}
In summary, I'm looking for the code to execute when the entire String "dude" is entered, not just "d" or "du" or "dud".