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

In which language eclipse is developed?

832


What is transaction management in java?

851


What is rxjava2?

829


What is aop java?

838


Write a program for the following topic - switch case,looping using fuction calling,nesting,console input output. Aim- to print a menu:- 1-series 2-single value. Each menu having sub menu armstrong or perfect.

1891


What about 'hostile applets'? : java security

860


What is orm in java?

875


Why we use beans in java?

869


What are the disadvantages of java sockets?

1049


What about javascript? : java security

957


What is meant by annotation in java?

929


What is the front end for java?

922


How can I swap two variables without using a third variable?

916


What is crud operations in java?

845


What is mq in java?

828