how do we extract words in java
Answers
Answered by
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