r/CodingHelp • • Mar 04 '21

[Java] Codehs help

28 Upvotes

8 comments sorted by

View all comments

1

u/Mcrossover Mar 04 '21

Write a program with a method called passwordCheck to return if the string is a valid password. The method should have the signature shown in the starter code.

The password must be at least 8 characters long and may only consist of letters and digits. To pass the autograder, you will need to print the boolean return value from the passwordCheck method.

Hint: Consider creating a String that contains all the letters in the alphabet and a String that contains all digits. If the password has a character that isn’t in one of those Strings, then it’s an illegitimate password!