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

Explain the difference between runnable and callable interface in java?

1093


how to split string in java?

1280


What is the most important feature of java? What is an interface?

1054


What are the disadvantages of object oriented programming?

1335


What is the differences between heap and stack memory in java? Explain

1028


What is the use of StringTokenizer class?

1109


Does constructor be static?

1082


Can You Have Virtual Functions In Java?

1199


How to make object serializable in java?

1029


What is sleep method?

1221


Can we declare the main method of our class as private?

1047


Can we clone singleton object?

1121


What’s the difference between applets and standalone program?

1103


What is static class

1156


What is the numeric promotion?

1091