Module 4, Assignment 1: I get the following error:


1 Answer(s)


Hi Guy,

The error typically comes because of this:

String classId = Integer.parseInt(tokens[0]) + "";
 
To confirm the error, you can use the exception handling:
try{
    String classId = Integer.parseInt(tokens[0]) + ""; 
}catch(NumberFormatException ex){ // handle your exception
   ...
}

Hope this helps.

Thanks.