so the program reads from a .txt, ie AB123.
now what i currently have is
String retailer_code = input.next();
// this is the alpha
char r_c = retailer_code.charAt(0);
char r_c1 = retailer_code.charAt(1);
String r_c6 = (""+r_c+r_c1);
// this is the number
char r_c2 = retailer_code.charAt(2);
char r_c3 = retailer_code.charAt(3);
char r_c4 = retailer_code.charAt(4);
String r_c5 = (""+r_c2 + r_c3 + r_c4);
int num = Integer.parseInt(r_c5);
now, how do i do the validation? i see my friends use try...catch.. NumberFormatException. it's just that im very new to this, so any ideas?