int f = (String) phoneArray[2];
if (0 <= f <= 100) {
String a = null;
if (0 <= f < 60) {
a = "E";
} else if (60 <= f < 70) {
a = "D";
} else if (70 <= f < 80) {
a = "C";
} else if (80 <= f < 90) {
a = "B";
} else if (90 <= f <= 100) {
a = "A";
}
} else if (((int) f > 100) + ((int) f < 0)) {
SimpleOutput.showError("Score is not an integer");
String g = new String();
g = phoneArray[2];
Your problem is here: int f = (String) phoneArray[2];
Try compiling it and seeing the error for yourself. I surely hope none actually takes this post seriously and does your homework for you.