Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how can program polindrome using java

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


Please Help Members By Posting Answers For Below Questions

Why is class forname used in java?

1045


What is tight coupling in java?

913


What is xml file in java?

917


What is the meaning of the words public, static and void?

853


What are the types of cookies in java?

965


What is the purpose of jdk?

900


What is the meaning of loosely coupled in java?

868


How do I install java re?

903


Differences between intermediate operations and terminal operations of java 8’s stream api?

1059


What is difference between map and flatmap in java 8?

853


What is gwt in java?

900


What are the disadvantages of java sockets?

1092


How do I download and install eclipse on windows 10?

816


Is java a framework?

874


What is dao in java?

948