Advertisement
Guest User

Untitled

a guest
Dec 18th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public boolean isValidAccountNum(String s) {
  2. if (accountNum.length() != 6) {
  3. return false;
  4. }
  5. if (!Character.isUpperCase(accountNum.charAt(0))) {
  6. return false;
  7. }
  8. for (int i = 1; i < accountNum.length(); i++) {
  9. if (!Character.isDigit(accountNum.charAt(i))) {
  10. return false;
  11.  
  12. }
  13. }
  14. return true;
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement