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 the difference between Logical Parallelism and Physical Parallelism?

0 Answers   HCL,


Why java is better than node.js?

0 Answers  


What is spliterator in java se 8?

0 Answers  


Is java an api?

0 Answers  


What is the java virtual machine (jvm)?

0 Answers  


What is a container in java?

0 Answers  


What are jpa repositories?

0 Answers  


What is the difference between a jvm and a jdk?

0 Answers  


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

2 Answers  


What is the purpose of jdk?

0 Answers  


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

0 Answers  


Please tell what are frames,pannel,container,jframe,jpannel and what are there relation?

1 Answers   TCS,


Categories