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
What is polymorphism java example?
Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?
What is comparator in java?
Can we use catch statement for checked exceptions?
What is a class component?
What is module in oop?
What is the purpose of encapsulation?
State some advantages of java?
What does three dots mean in java?
What does i ++ mean in Java?
How does a for loop work java?
How do you create a reference in java?
How do you declare a variable?
Explain differences between collection api and stream api?
Can we define a package statement after the import statement in java?