Quote:
Originally Posted by nikhilgupta345
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?
__________________