How do you reverse a string in java?



How do you reverse a string in java?..

Answer / Shashi Saini

To reverse a string in Java, use the StringBuilder class: StringBuilder reversedString = new StringBuilder(input).reverse();

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What do you mean by buffering?

1 Answers  


What will happen if a thrown exception is not handled?

1 Answers   ABB, Akamai Technologies, Infogain,


If you are given the name of the function at run time how will you invoke the function?

1 Answers   Adobe, Yahoo,


Name few java 8 annotations ?

1 Answers  


What is the current version of java?

1 Answers  


What is the difference between panel and frame ?

7 Answers   HCL, IBM, Raim Techno Solutions,


what is a working thread? : Java thread

1 Answers  


How to call a Stored Procedure from JDBC?

4 Answers   Satyam,


How many threads can java run?

1 Answers  


Why is whitespace important?

1 Answers  


Why set is used in java?

1 Answers  


What is the use of coding?

1 Answers  


Categories