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

Where are global variables stored?

1009


Is hashset ordered?

1123


what methods would you overwrite in java.lang.object class?

1060


How to use string tokenizer class.

1269


Tell us something about set interface.

1065


What is finalize()?

1262


How do you sort words in java?

985


Explain spliterator in java8?

1096


What's the difference between an abstract class and interface in java?

1079


What is static synchronization?

1155


What is the generic class?

1013


How to split a string in java?

1178


What is the diffrence between inner class and nested class?

1134


What are decalarations?

1178


Explain reverse a linked list recursive java solution?

1040