Computer Science, asked by Sruti368100, 5 months ago

write a program to accept a sentence from the user and print each word in a new line in java​

Answers

Answered by itztripti
1

Answer:

There are several logics to implement this problem but the basic aim is to divide the string in substrings which can be done by spliting the string using whitespaces . Simple solution to this can be using split function which helps to divide a string in parts.

The method split() is used for splitting a String into its substrings based on the given delimite.

Answered by tajmohamad7719
5

Answer:

please mark my Brainliest

Attachments:
Similar questions