Question: Problem 2 Write a method stringReverse that takes a string str as argument and returns a string with the characters in opposite order (the method

Problem 2 Write a method stringReverse that takes a string str as argument and returns a string with the characters in opposite order (the method should not print anything to the console). The signature of the method should be as follows: public static String stringReverse(String str) Hint: The method should build a string one character at a time using the + operator, starting with the empty string" Use the method to write a program StringReverse.java that takes an integer command line argument N followed by N strings and prints each of the strings in its reverse order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
