Search results
import java.util.Scanner; public class Password { public static void main (String [] args) { // Prompt the user to enter their password and pass their string // to the passwordCheck method to determine if it is valid.
I've been trying to finish the password checker assignment. This is my code. I was wondering why it still returns true when the password I enter has characters in it. I wrote the passwordCheck () method differently than you, so I'll walk you through my process. First, return statements.
public class Password { public static void main(String[] args) { // Prompt the user to enter their password and pass their string // to the passwordCheck method to determine if it is valid. Scanner sc = new Scanner(System.in); String pw = sc.nextLine(); System.out.println(passwordCheck(pw)); }
This video is designed to help you finish this module without giving you the entire code.
Write a method that checks whether a string is a valid password. Suppose the password rule is as follows: A password must have at least eight characters. A password consists of only letters and digits. A password must contain at least two digits.
Study with Quizlet and memorize flashcards containing terms like 4.3.6 Replace Letter, 4.3.7 Password Checker, 4.3.8 Finding Palindromes and more.
Can someone help me with this:”4.3.7 Password Checker”? Also if possible do you have the other exercises in 4.3?