package ae.naveed; import java.util.Scanner; public class FindPalindrome { public static void main(String[] args) { Scanner scanner = new Scanner(System. in ); char [] inputString = scanner.nextLine().toCharArray(); int i = 0 , j = inputString. length - 1 ; while (j > i ) { if (inputString[i] != inputString[j]) { System. out .println( "NO" ); return ; } j--; i++; } System. out .println( "YES" ); } }
This is my personal blog for the things that i do at work. I will post the interesting stuff that i do at my day to day work. It can work as a revision for me on the things that i have done.