import java.io.*;
public class PP1 {
public static int getGoodInt(BufferedReader kbd) {
int n;
boolean ok=false;
while ( !(ok==true)) {
try {
BufferedReader br = new BufferedReader(
new InputStreamReader(System.in));
String instring = br.readLine();
n = Integer.parseInt(instring);
ok=true;

}
catch (IOException e)
{
System.out.println("Input/output error");
}
catch (NumberFormatException e)
{
System.out.print(n +" is not an int -- try again:");
//error variable n might not have been initialized
}
}
return n; // same thing as the other
}
}
help
thanks