0
Can someone pls explain whats wrong with this code?it shows the result,but still wrong.
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(); //your code goes here int i=arr.length; while (i>=0){ System.out.println(arr [i-1]); i--; } } } This is the code of the project of the array lesson in java(reversing an array) .It shows the result in the java playground but it throws an erro in the project. https://code.sololearn.com/cIq8UnFF3281/?ref=app
3 Respuestas