Wpis z mikrobloga

#java #programowanie

ma ktoś pomysł na:

String sentence = "How are you, are you ok? If not please say something. I would like to ask you how was your day. What are your plans for the >rest of the week? Any good plans for the weekend? Just-in-case if we don't see each other: have a joyful day!";



It is your sentence, with which you will be working today.


Assume that a word is a substring of a sentence, that may be limited by:


- blank space (" ") - please note, that there might be more than one white space,


- a punctuation mark (for example: ".", ",","!" and so on).


Assume that a word is a substring containing letters only. Hyphenated word is one word, numbers are always ommited.


Divide variable "sentence" into separate words. Print each word out in separate line on the console, in the order, in which they are in >the sentence.
  • 6