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

Where is stringbuffer stored?

917


Is hashset ordered?

980


What does += mean coding?

883


what is the difference between future and callable interface in java?

1146


What is Java Package and which package is imported by default?

1031


What happens if main method is not static?

949


What is difference between equals and hashcode method?

1046


Can a class be declared as protected?

958


What is java developer skills?

924


What is difference between core java and java ee?

849


How strings are created in java?

972


What is the difference between C++ and Java and your preferences?

1065


Is integer immutable in java?

925


What is abstraction in java?

1024


What is an interface in java? Explain

1078