This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
The first steps always involve turning off your computer. Stop thinking about writing a program. Start thinking about how you would tell a child to do this task.
Assume all the data is written on a piece of paper.
How would you tell the child to identify the "first word"?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Jan 16, 2013
Probably i will give him a scissor and show where he should cut the paper or , oh, i am not good at communicate with childs i dont know man.
or i can let him know he should not take after first whitespace ?
I'll give you another clue since you seem to be struggling. Look at the api docs for the String class and read about the indexOf() method. Does that give you any ideas on how you could find that space?
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson