SyntaxFix
Write A Post
Hire A Developer
Questions
String carName = // insert code here int index = -1; for (int i=0;i<TYPES.length;i++) { if (TYPES[i].equals(carName)) { index = i; break; } }
After this index is the array index of your car, or -1 if it doesn't exist.
index