1.

Design a class PS that has two static methods palindromeOrNot) and series(). palindromeOrNot() method accepts a number from userand checks whether it is a palindrome number.series() method should print the series having terms as4N+1 (print first 5 terms).​​

Answer»

Palindrome Program in JavaPalindrome NUMBER in java: A palindrome number is a number that is same after reverse. For example 545, 151, 34543, 343, 171, 48984 are the palindrome NUMBERS. It can also be a string like LOL, MADAM etc.Palindrome number algorithmGet the number to check for palindromeHold the number in TEMPORARY variableReverse the numberCompare the temporary number with REVERSED numberIf both numbers are same, print "palindrome number"ELSE print "not palindrome number"



Discussion

No Comment Found