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

can you program for reverse string?

Answer Posted / narayanan

public class reverse {
public static void main(String args[]){

String s="malayalam";
StringBuffer sb=new StringBuffer();
int k=s.length();
for (int i = k-1; i >-1; i--) {
sb.append(s.charAt(i));

}
System.out.println(sb);
}

}

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the statements?

1038


What is a for loop in java?

990


What if constructor is protected in java?

1024


When the constructor of a class is invoked?

973


What is java util hashmap?

940


What’s a deadlock?

1044


What is the use of using enum to declare a constant?

955


Do I need to import java.lang package any time? Why?

1309


What is the difference between final, finally and finalize() in java?

1052


Is constructor inherited?

912


How do you invoke a method?

949


What is the use of beaninfo?

980


What is int short for?

958


How do you create a sop?

944


What is use of arraylist in java?

1097