mafagafo
- 188
- 12
Not the solution to the problem, but no one commented yet that, unless you are generating huge passwords (and in that case Java is by far not the best choice), you should use the Character.isLowerCase() and Character.isUpperCase() methods. It is considered superior due to a series of reasons (some somewhat stupid, tagged as 'enterprisey') that are sold by the name 'Software Engineering'.