Create a class the asks

Create a class the asks the user for their name. Loop and call the validateName method that checks the name against the valid name array. If there is a match move on to the next section. If it does not match loop and ask again for the name until there is a match.The validateName method has one String as an argument and returns a Boolean value of true or false. It checks the incoming argument against the array of valid usernames that you create. It should have at least three names. If a valid name is ***** ***** return true, else return false.Once the validate name is ***** ***** the main method will loop again and ask the user for their password. It will then pass the password ***** the validatePassWord ***** that will check the password ***** the password ***** If they match, continue. If they don’t match loop and ask the user to try again. The validate password ***** should have three valid passwords at least. The same number as valid login names.The validatePassWord ***** takes one String as an argument and returns a Boolean value. If the incoming String matches one of the passwords in the password ***** then return true, otherwise return false.Once the password ***** ***** display “Login successful” from the main method..