Computer Science, asked by ayan1039, 11 months ago

how do we extract words in java

Answers

Answered by gautamkumar118
0

Answer:

String [] words = str.split(" ", 3); for (String word : words) System.out.println(word); }

...

Simplest method to extract the words is using split() of string class as below example:

/**

* @author ashok.kumar.

*

*/

public class strSplit {

/**

* @param args.

*/

Similar questions