I get the error message error: incompatible types: char cannot be converted to String
return Integer.parseInt(cases2[0]);
but my code is:
public static int standingOvation(String cases){
char[] cases2 = cases.toCharArray();
return Integer.parseInt(cases2[0]);
}
Why am I getting the error if i'm clearly trying to convert cases (which is passed in as "11111") to an integer?