//Fill in the blanks such that program will generate expected output. public class PalindromPaper { _______ int sum; _______ boolean b = true; public static void main(String args[]) { int no = Integer.parseInt(args[0]); _________.peli(no,__________); if(_________) System.out.println("Palindrom"); else System.out.println("Not Palindrom"); } __________ void peli(int no,int original) { if(no==0) { if(sum == original) b = true; else b = false; return; } int rem = no%10; sum = (sum*10) + rem; peli(no,original); } }
Expected Output:
If We enter no : 121, Output will be "Palindrom"
If We enter no : 123, Output will be "Not Palindrom"