Created
June 9, 2015 03:16
-
-
Save scottnguyen/89deb74b35cbcf2baedd to your computer and use it in GitHub Desktop.
homework stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String checkPassword(String password){ | |
//... your previous logic | |
for (int i = 0 ; i < password.length - 3; i++) { | |
if (password.charAt(i) == password.charAt(i+1) && password.charAt(i) == password.charAt(i+2)) { | |
result = "invalid"; | |
} | |
} | |
return result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment