Question: usernameChecker ( ) Method Write a method called usernameChecker ( ) that accepts one parameter String called username. The method should check to make sure
usernameChecker Method
Write a method called usernameChecker that accepts one parameter String called username. The method should check to make sure that username is at least characters in length and contains one of special symbols $ &
The method should return true if the username requirements are met and return false if requirements are not met.
import java.io;
import java.util.;
import java.text.;
import java.math.;
import java.util.regex.;
public class CodingQuestion
Write your static method here
DO NOT CHANGE THE CODE BELOW THIS LINE
public static void mainString args
Scanner in new ScannerSystemin;
String username innextLine;
boolean meetsRequirement usernameCheckerusername;
if meetsRequirement
System.out.printlnusername meets the requirements.";
else
System.out.printlnusername does not meet the requirements.";
end of main
Expected STDOUT
ollie! does not meet the requirements.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
