You are viewing a single comment's thread. Return to all comments →
String A = sc.next(); String revA = new String(); for(int i=A.length(); i>0; i--){ //revA += A.substring(i-1,i); revA = revA.concat(A.substring(i-1,i)); } if(A.compareToIgnoreCase(revA) == 0){ System.out.print("Yes"); } else { System.out.print("No"); }
Seems like cookies are disabled on this browser, please enable them to open this website
Java String Reverse
You are viewing a single comment's thread. Return to all comments →