SyntaxFix
Write A Post
Hire A Developer
Questions
for (int i = 0; i < Types.length; i++) { if(TYPES[i].equals(userString)){ return i; } } return -1;//not found
You can do this too:
return Arrays.asList(Types).indexOf(userSTring);