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 the use of optional ?
What are the 8 data types in java?
What carriage return means?
How is it possible for two string objects with identical values not to be equal under the == operator?
Difference between operator overloading and function overloading
What is %d in printf?
What is the difference between class & structure?
Is there any case when finally will not be executed?
Give some features of interface?
Can we return null in java?
What do you mean by garbage collection used in java?
Can we call the run() method instead of start()?
Explain the use of sublass in a java program?
What is the difference between abstraction and encapsulation?
what is use of functional interface in java 8?