Question: Implement the method reverseString(): public class ReverseString { public static void main(String[] args) { System.out.println(nep == System.out.println(licnep System.out.println(enohp System.out.println(mom } } +reverseString(pen)); == +reverseString(pencil)); ==
Implement the method reverseString():
![public class ReverseString { public static void main(String[] args) { System.out.println("nep =="](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1706/2/5/4/93465b36256c9dd31706254929331.jpg)
public class ReverseString { public static void main(String[] args) { System.out.println("nep ==" System.out.println("licnep System.out.println("enohp System.out.println("mom } } +reverseString("pen")); ==" +reverseString("pencil")); ==" +reverseString("phone")); == + reverseString("mom")); public static String reverseString(String input) { Given a String input, return the String in reverse order. i.e. pen should return nep, pencil should return licnep. Assume input is all lower case and only contain letters */ m
Step by Step Solution
3.38 Rating (160 Votes )
There are 3 Steps involved in it
To implement the reverseString method you need to write the code that takes an input string and retu... View full answer
Get step-by-step solutions from verified subject matter experts
