Replace switch(str){ case LABEL: ...} with myString.equals()