View Single Post
  #2 (permalink)  
Old 12-11-2007, 06:54 AM
staykovmarin staykovmarin is offline
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
Code:
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.
Reply With Quote