The Artima Developer Community
Sponsored Link

Java Buzz Forum
How to reverse words in String Java? [Solution]

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 1090
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
How to reverse words in String Java? [Solution] Posted: Jun 10, 2015 10:07 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: How to reverse words in String Java? [Solution]
Feed Title: Java67
Feed URL: http://www.java67.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
In this Java Coding tutorial, you will learn how to reverse words in String. It's also one of the popular coding question, so you will also learn how to take requirement, how to fill gaps in requirement by asking right question. A String is nothing but a sentence, which may contain multiple works, or just contain single word or it may be empty. Your program must produce a String contains word in reverse order , for example if given input is "Java is Great" then your program should return "Great is Java".  Now, if you are a good programmer then you should have some right questions for programmer. Never assume you know everything, even if its looks a simple problem. Always remember "Devil is in detail". Also asking question not only fill the gaps in requirement but also help you to make impression. One of the question candidate should definitely ask is, what constitutes a word here? For purpose of this program, word is nothing but a sequence of non-space characters. Another good question you can ask to Interview is about input, e.g. is it possible for input string to contain leading or trailing spaces? Yes, its possible. However, your reversed string should not any contain leading or trailing spaces. One more important question for Interviewer is about spacing between words, is it possible to have multiple spaces between two words? Yes, it could be possible but you can reduce them to a single space in the reversed string. BTW, if you preparing for programming job interview, you can also take a look at Cracking the Coding Interview: 150 Programming Questions and Solutions, you will not only find some good question on array and String on this book, but also about several other key topics e.g. SQL, database, networking and Java.
Read more »

Read: How to reverse words in String Java? [Solution]

Topic: Email Recovered from Genetech Debris, Lt. Jeffrey Abramowitz Investigating Previous Topic   Next Topic Topic: Ant hooks using Groovy via XML transform

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use