請問大大為什麼會出現RE呢 ? ~"~ 程式碼 謝謝
import java.util.Scanner;
public class test {
public static void main(String[]args) {
Scanner input = new Scanner(System.in);
while (true) {
String text = input.next();
char[] x = text.toCharArray();
char[] y = new char[1000];
boolean sure = true;
for ( int i = x.length-1 ; i >= 0 ; i-- ) {
y[x.length-1-i] = x[i];
}
for ( int i = 0 ; i < x.length ; i++ ) {
if ( x[i] != y[i] ) {
sure = false;
break;
}
}
System.out.println(sure? "yes" : "no");
}
}
}