You are viewing a single comment's thread. Return to all comments →
public static void main(String[] args) { Scanner sc=new Scanner(System.in); String A=sc.next(); StringBuilder sb = new StringBuilder(); System.out.println(A.equals(sb.append(A).reverse().toString()) ? "Yes" : "No"); sc.close(); }
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 →