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...

How can you reverse a string?

Answer Posted / haneef

public class Main {
public static void main(String[] args)
{
String str1="HANEEF";
for(int i=str1.length();i>0;i--)
{
System.out.print(str1.charAt(i-1));
}
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?

972


What is the benefit of singleton pattern?

985


How many types of literals are there in JAVA?

1045


Can a class have more than one object?

996


Name few "optional" classes introduced with java 8 ?

1134


What is off heap memory?

1005


How do you identify if jvm is 32-bit or 64-bit from java program?

967


What are actual parameters?

1034


When is finally block not called?

1093


What does  mean in regex?

1056


how would you implement a thread pool? : Java thread

917


How do you do descending order in java?

968


Which of the following is not an isolation level in the JDBC

2126


How listener identify that the event came from a particular object?

1995


What all access modifiers are allowed for top class ?

1186