You are viewing a single comment's thread. Return to all comments →
Scanner scan = new Scanner(System.in); String word= scan.next(); StringBuilder wordBuilder=new StringBuilder(word); String wordReverse=new StringBuilder(wordBuilder.reverse()).toString(); String r= word.equals(wordReverse)? "Yes":"No"; System.out.println(r);
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 →