Saturday, 12 April 2014

Java String Handling

1. How to reverse a given String


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


No comments:

Post a Comment