Check out example codes for "how to get individual words from a string in java". It will help you in understanding the concepts better.

Code Example 1

{
public static void main(String args[])
{
String str = "Hey this is Ram";
String [] words = str. split(" ", 3);
for (String word : words)
System. out. println(word);

Learn ReactJs, React Native from akashmittal.com