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

What are heap memory and stack memory and what are memory tables.

980


What is an object’s lock and which object’s have locks?

951


What is identifier give example?

1026


Explain differences between collection api and stream api?

1174


What do you mean by garbage collection used in java?

1060


Does list maintain insertion order java?

904


Why do I need to declare the type of a variable in java?

1064


What is the benefit of singleton pattern?

981


What are the different types of inner classes?

1029


How java enabled high performance?

1044


What are the main uses of the super keyword?

964


What is the purpose of object oriented programming?

966


Explain about doubly linked list

1023


List some features of the abstract class.

1052


What is main difference between variable and constant?

1027