can you program for reverse string?

Answer Posted / indumathi

public class StringReverseExample {

public static void main(String[] args)
{
String string=args[0];
String reverse = new StringBuffer
(string).reverse().toString();
System.out.println("\nString before
reverse:"+string);
System.out.println("String after
reverse:"+reverse);
}


}

Is This Answer Correct ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the importance of static variable?

794


Implementations of set interface?

771


Which collection is ordered in java?

735


Why is string class considered immutable?

810


Is java free for commercial?

667


What do you know about java?

719


What will be the default values of all the elements of an array defined as an instance variable?

772


Does treeset allow null in java?

707


How do you classify Dialog Box?

841


What is the length of a string?

738


What is the major difference between linkedlist and arraylist?

716


explain the concept of virtual method invocation in polymorphism in detail?

1931


What an i/o filter?

730


What is t type java?

815


I want to persist data of objects for later use. What is the best approach to do so?

806