Monday, August 2, 2010

Article | Java To Check Whether a string is pallindrome or not

To Check Whether a string is pallindrome or not



import java.io.*;



class Pallindrome

{

public static void main(String args[])

{

String ch="";

int f=0;

System.out.print(" Enter A String : ");

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

try

{

ch=br.readLine();

}catch(Exception e){}

int n=ch.length();

for(int i=0; i <(n/2) ; i++)

{

if(ch.charAt(i)==(ch.charAt(n-i-1)))

{

f=1;

break;

}

}

if(f==1)

System.out.println(" Is A Pallindrome ");

else

System.out.println(" Is Not A Pallindrome ");

}

}

Loading...

Comments :

7 comments to “ Java To Check Whether a string is pallindrome or not ”
 
Anonymous said...

GermanyFlowerShop.Com is online, ready to send gifts and flowers to Germany. Send your gifts and flowers same day through local Germany Florist. Fresh Flowers Bouquet, Flowers Arrangement, Plants, Gift Basket, Gourmet Hamper, Wine Hampers, Chocolates and many more gifts can now be ordered online for delivery in Germany. For details, visit www.germanyflowershop.com/Christmas_To_Germany.asp.

November 13, 2010 at 3:32 PM  
 
swapan kumar said...

Get into www.freshflowersrome.com to send flowers to Rome, Italy with other superb gifts and pamper your special ones in a luxurious way

March 11, 2011 at 4:45 PM  
 
Anonymous said...

Puzzled about the right gift? Just get into www.gifts2bangalore.com and send gifts to Bangalore for every occasion.

March 12, 2011 at 4:02 PM  
 
Anonymous said...

Flowers and gifts are sure shots, when it’s about making someone feel special on the special events. Within seconds, their moods swing to a joyous one. The joy and happiness you bring to them is priceless, and the same for us as well. Come and visit www.amourfleurs.com/France_Mothersday.asp for more.

March 24, 2011 at 2:48 PM  
 
VCommission said...

I am confident that by following your recommendations, I will not be
disappointed. I sincerely thank your efforts for making us knowledgeable people.
you have mentioned very useful and profitable message message for us .
Thanks

best affiliate programs

March 28, 2011 at 10:04 AM  
 
Indrashis said...

Accessorize your personal and seasonal events with marvelous gifts. Your relations are the indispensables to your life, and gifts pay tribute to their contributions. Visit www.freshflowersbangalore.com/mothers_day_gifts.asp today.

April 5, 2011 at 5:19 PM  
 
HampersNationWide(China) said...

Delivery is as important as choosing the right one. This is more important in case of the online book shopping, and it’s the network presence that makes the difference. More the spread, less is the time for delivery, and certainly the intangible asset called goodwill increases. A click at www.rightbooks.in/Delivery_Locations.asp will make the visitor understand the details of the presence that RightBooks.In enjoys all over India.

May 12, 2011 at 1:01 PM  

Post a Comment

Enter any comments

Followers