Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean isValidAccountNum(String s) {
- if (accountNum.length() != 6) {
- return false;
- }
- if (!Character.isUpperCase(accountNum.charAt(0))) {
- return false;
- }
- for (int i = 1; i < accountNum.length(); i++) {
- if (!Character.isDigit(accountNum.charAt(i))) {
- return false;
- }
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement