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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!