TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
String Reverse Using StringUtils function in Java
Alagunila Meganathan
Aug 03
2016
Code
700
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
StringReverseUsingSt
import
org.apache.commons.lang.StringUtils;
public
class
StringReverseUsingStringUtils
{
public
static
void
main(String[] args)
{
String string =
"Hi, How R YOU?"
;
String reverse = StringUtils.reverse(string);
String delimitedReverse = StringUtils.reverseDelimited(string,
' '
);
System.out.println(
"\nThe original String: "
+ string);
System.out.println(
"The reversed string: "
+ reverse);
System.out.println(
"The delimited Reverse string: "
+ delimitedReverse);
}
}
Java