View Single Post
  #30 (permalink)  
Old 05-09-2008, 04:32 AM
Bascotie Bascotie is offline
Member
 
Join Date: Apr 2008
Posts: 77
Bascotie is on a distinguished road
Also I'm trying this statement under userPhone token but I can only do the first if not the second part successfully, i think they are in conflict, Im trying to satisfy the part where the phone number cannot be over 10 characters and must be an INTEGER and POSITIVE

Code:
int userPhoneTwo = Integer.parseInt(userPhone); if (userPhone.length() > 10 || userPhoneTwo < 0) { JOptionPane.showMessageDialog(null, "Phone number cannot be longer than 10 digits and must be a positive integer"); System.exit(0);}
Reply With Quote