0
Reversing are char
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String text = scanner.nextLine(); char[] arr = text.toCharArray(); // Any other way aside my solution given below. //your code goes here int arrLen = arr.length; for(int i = arrLen; i >= 0; i--){ System.out.println(arr[i]); } } }
1 Respuesta