Answer Posted / mahesh
import java.lang.*;
class Plindrome
{
public static void main(String arg[])
{
int n=121,m;
int rev,rem;
rev=0;m=n;
while(n>0)
{
rem=n%10;
rev=rev*10+rem;
n=n/10;
}
if(m==rev)
{
System.out.println("palindrome",+rev);
}
else
{
System.out.println("not palindrome",+rev);
}
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why is class forname used in java?
What is tight coupling in java?
What is xml file in java?
What is the meaning of the words public, static and void?
What are the types of cookies in java?
What is the purpose of jdk?
What is the meaning of loosely coupled in java?
How do I install java re?
Differences between intermediate operations and terminal operations of java 8’s stream api?
What is difference between map and flatmap in java 8?
What is gwt in java?
What are the disadvantages of java sockets?
How do I download and install eclipse on windows 10?
Is java a framework?
What is dao in java?