0

Reverse a string gives error

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(); for (int i = arr.length-1; i>=0; i--) {     System.out.print(arr[i]); } } }

10th Jul 2021, 1:30 PM
Dolly Jain
Dolly Jain - avatar
1 Odpowiedź
0
Your code contains invalid characters which prevents code from being proccesed. You can see them if you view the code in browser.
10th Jul 2021, 2:03 PM
Ipang