Question: reverse method reverses a string. it gets a string and returns it in reverse. for example: reverse(foo) ==> oof reverse(student) ==> tneduts ------------------------------------------- import java.util.*;

reverse method reverses a string.

it gets a string and returns it in reverse.

for example:

reverse("foo") ==> "oof"

reverse("student") ==> "tneduts"

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

import java.util.*;

class Main { // Your main method here public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Enter input:"); String input = scan.next(); System.out.println(reverse(input)); } public static String reverse(String input) { //Your code here

return null; } }

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!