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

What is an api in java?

0 Answers  


Is jprofiler open source?

0 Answers  


What is a context in java?

0 Answers  


What is the difference between Enumeration and Iteration interfaces? What is the way of to retreive the objects from these interfaces ?

1 Answers   Cap Gemini,


What does @override mean in java?

0 Answers  


What is meant by pass by reference and pass by value in java?

0 Answers  


What is jar file in java?

0 Answers  


How to implement Thread

2 Answers  


Why do we only use the main method to start a program?

0 Answers  


How do you count in java?

0 Answers  


Explain different way of using thread?

0 Answers  


How do I enable javascript?

0 Answers  


Categories