Check out example codes for "parcourir un string java". It will help you in understanding the concepts better.

Code Example 1

1234 
String[] result = "this is a test".split("\\s");
     for (int x=0; x<result.length; x++)
         System.out.println(result[x]);

Learn ReactJs, React Native from akashmittal.com