how can program polindrome using java
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 |
what is the package for freshers in valuelabs.
What is dependency injection in java?
why the sleep method does not leave the lock and wait method leave the lock
What is Map,List,hashtable,ArrayList and difference between them??
What is exe file in java?
What is java ioc?
For each of the following program segments,give a big zero analysis for the running time 1.For (i=0;i<m;i++) { // } 2.For (j=0;j<i;j++)
0 Answers St. Pauls University,
What are orm tools in java?
Is jar an executable?
What is web container in java?
What is transient in java?
What is the content of the Java 2 security policy file?