Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analytics Systems Engineering Cybersecurity Project Management

Authors: Christopher Greco

1st Edition

168392648X, 978-1683926481

More Books

Students also viewed these Databases questions