Thread: Java help
View Single Post
jingojang
Senior Member
Join Date: Feb 2010
Location: The Moon
Old 12-16-2013 , 05:34   Re: Java help
Reply With Quote #4

Quote:
Originally Posted by nikhilgupta345 View Post
Look up the String split() function: it splits a string into an array of smaller strings, based on a certain delimiter (basically where you want to separate the strings from). You can make it so that it splits it based on a space, so you will get an array of words, in your case. Then take the 0 index and the length-1 index of that array, and those will give you the first and last words entered.
Hi nikilgupta345, would you mind creating an example?
__________________
jingojang is offline