Question
JAVA- In the U6_L3_Activity_Three class, write a public static method called printUn, which has a single parameter of an array of String values. The method
JAVA-
In the U6_L3_Activity_Three class, write a public static method called printUn, which has a single parameter of an array of String values.
The method printUn, which should be void, must print all the Strings from the parameter array which start with "un".
Use the runner class to test this method: do not add a main method to your code in the U6_L3_Activity_Three.java file or it will not be scored correctly.
Hint: you will need to get the substring containing the first 2 letters of each string, and compare it to "un", but be careful - your parameter array may contain Strings which are less than 2 characters long.
Sample run (runner class):
Enter array length: 6 Enter values: universe ubiquitous unavoidable i look nothing universe unavoidable
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