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
Why can't we use static class instead of singleton?
What is the difference between double and float variables in java?
What are synchronized blocks in java?
Which of the classes will have more memory allocated?
Write a program in java to establish a connection between client and server?
How to check if a list is sorted in java?
How static variable work in java?
What is the purpose of the system class in java programming?
What is the class in java?
Why is string buffer better than string ?
What is null data type?
What is the effect of keeping a constructor private?
What does business logic mean?
Can an interface be defined inside a class?
What is the tradeoff between using an unordered array versus an ordered array?