0
please take a string code as input and put its reverse?!
convert to char array and do code by using arr.length
1 Answer
0
import java.util.*;
public class Program
{
public static void main(String[] args) {
String s;
//s = "sololearn";
Scanner inp = new Scanner(System.in);
s = inp.nextLine();
char[] cs = s.toCharArray();
for (int i=cs.length-1; i>=0; i--) System.out.print(cs[i]);
}
}