Java program to reverse a string
This java program reverses a string entered by the user. We use charAt method to extract characters from the string and append them in reverse order to reverse the entered string.
Java programming code
Download Reverse string program class file.
Output of program:
Reverse string using StringBuffer class
StringBuffer class contains a method reverse which can be used to reverse or invert an object of this class.
ConversionConversion EmoticonEmoticon