Question: Implement the method named reverse which processes the array of strings named words by printing each String from words backwards on its own line. For

Implement the method named reverse which processes the array of strings named words by printing each String from words backwards on its own line.

For example, if words contains:

{"every", "nearing", "checking", "food", "stand", "value"}

The method should output:

yreve gniraen gnikcehc doof dnats eulav

Use the runner class to test this method: do not add a main method to your code in the U6_L3_Activity_Two.java file or it will not be scored correctly.

Hint: For this activity though you will need your outer loop to iterate through the array, and your inner loop to iterate through the string.

------------------------------------------------------------------------------------------

Coding Language: JAVA

This is what I have so far:

public static void reverse(String[] words) { for (int i = 0; i < words.length; i++) { for (int j = words[i].length(); j > 0; j--) { System.out.println(); } } } ----------------------------------------------------------------------------------------

I'm not sure what I have to print out or if I am doing the inner loop correctly. Please help, thank you!

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!