For an assignment I'm to make a program that takes in a user input as a password containing at least ten characters and at least one letter and one number.
I've got the ten character verification down I think, but I didn't see anything in the book yet (or if I did it didn't go into much detail on it), that explains much about verifying a string has a set number of characters/numbers.
The lesson did cover the StringBuilder, and looking over the lesson it did mention something like "public StringBuilder (String strArg)", although I'm a little confused on the description of it. It says " Arguments: A String object (that will be copied to the StringBuilder)
Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string."
To me this sounds like you could set say :
and as long as the user input was at least five characters and a number it would pass... Or at least that's what it sounds like to me, I could be dead wrong on it.
If someone could clarify this a bit more or point in me in the correct direction in terms of googling criteria I'd be much obliged.
