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 / aravinda reddy

String reverse without using reverse method string class

public class StringReverse {
public static void main(String[] args) {
String str = "Aravind";
StringBuffer s = new StringBuffer();
char[] ch = str.toCharArray();
int n = ch.length;
for(int i=n-1;i>=0;i--)
s.append(ch[i]);
System.out.println(s.toString());
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.

1940


What is use of arraylist in java?

1097


What do you mean by composition in java?

949


Difference between notify() method and notifyall() method in java?

911


What is set string?

1077


Is sizeof a keyword in java programming?

1013


placement papaers of spring computing technology

1358


Why volatile is used in java?

983


How to display all the prime numbers between 1 and n (n is the number, get the input from user)

925


What is a Transient Object?

1019


Can we override constructor?

962


What is yield () in java?

832


Why are the destructors for base class and derived class called in reverse order when the program exits

2125


How do you bind variables?

1022


How to create a fecelet view?

937