write a java program to reverse a string
Answers
Answered by
6
Answer:
import java.util.*;
class abc{
public static void main (String ar []){
Scanner sc=new Scanner(System.in);
String s =sc.nextLine();
for(int I=s.length()-1;I>=0;I--)
System.out.print(s.charAt(I));
}
}
- Run a reverse loop and print thr character at that position
Attachments:
Answered by
5
https://brainly.in/question/<number>
37937856, 33815868, 9121483, 21530589 and 13379846.
Similar questions