Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Tech_03;
- import java.util.Scanner;
- public class reverseString {
- public static void main(String[] args){
- Scanner scanner = new Scanner(System.in);
- String input = scanner.nextLine();
- String reverse = "";
- for(int i = input.length() - 1; i >= 0; i --){
- reverse += input.charAt(i);
- }
- System.out.println(reverse);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement