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

how its run?

1065


What is return keyword in java?

1053


Why do we need autoboxing in java?

998


Is a method a function?

1062


What are the basic concepts of OOPS in java?

1036


What happens if an exception is throws from an object's constructor?

1133


What is difference between static and final?

1068


What is the output of the below java program?

1048


Is intellij better than eclipse?

1092


What is string syntax?

1054


Can a top level class be private or protected?

1056


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

1234


How can a gui component handle its own events?

1113


What is meant by class loader? How many types are there? When will we use them?

971


Why use string handling in Java?

1030