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



how can program polindrome using java..

Answer / 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

More Java Related AllOther Interview Questions

How can I check single byte, double byte of character in JTextField?(eg. japan unicode and English unicode)

0 Answers  


Why do we need framework in java?

0 Answers  


Define network programming?

0 Answers  


What is spliterator in java se 8?

0 Answers  


What are all the documents have you involved in preparation of a Project as a Project Lead?

2 Answers  


What is a java proxy?

0 Answers  


What is the locale class?

0 Answers  


How to implement Hash Map?

2 Answers   HCL,


What is stateless class in java?

0 Answers  


explain isalive() method under thread class?

0 Answers  


what are the steps in JDBC connectivity..???

1 Answers   IBM, SoftCom, TCS,


Can I use openjdk for commercial?

0 Answers  


Categories