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...

String Reverse in Java...!

Answer Posted / soumya roy

public class rev
{

public static void main(String[] args)
{
String str="hi my name is hello ";
System.out.println("the string is :" + str);
char[] ch=str.toCharArray();
int i;
int len = ch.length;
for(i=len-1;i>=0;i--)
{
System.out.print(ch[i]);
}
}
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between ‘is-a’ and ‘has-a’ relationship in java?

990


Why spring singleton is not thread safe?

984


What is preflight request?

989


What is variable and rules of variable?

999


Can you declare a private method as static?

1126


What is consumer in java?

953


Can we use return in constructor?

930


What’s a deadlock?

1087


Can we inherit inner class?

991


What about static nested classes in java?

1118


What is generic class?

1079


How would you format a date in java? I.e. In the ddmmyyy format?

1350


What is abstract class constructor called?

989


Explain about anonymous inner classes in java?

1053


Have you ever used hashtable and dictionary?

1002