Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Code a method called usernameCheck to check your Instagram followers' usernames. The method takes in an array of String with all the usernames that
Java
Code a method called usernameCheck to check your Instagram followers' usernames. The method takes in an array of String with all the usernames that can be a mixture of uppercase characters, lowercase characters, symbols and numbers. The method should return the index of first username that has more than 5 uppercase characters and more than 4 numbers. If there is no username that meets the username check requirement, returns - 1. You can assume that the array is always not null. Note: You must use the most appropriate patterns. Code should be efficient Hint: The charAt() method returns the character at the specified index in a string. For example, the following expression is evaluated to false: "AbC".charAt(1)='A' && "ABC".charAt(0)='A' && "AbC".charAt(0)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started