loop through string in java

htt‮www//:sp‬.lautturi.com
loop through string in java
/**
 * @author lautturi.com 
 * Java example: iterate over string in java 
 */

import java.util.*;

public class Lautturi {
	public static void main(String[] args) {
		String str = "hello lautturi.com java world!";

		for (int i = 0; i < str.length(); i++){
		    char c = str.charAt(i);        
		    System.out.print(c+" ");
		}

	}
}

output:

h e l l o   l a u t t u r i . c o m   j a v a   w o r l d !
Created Time:2017-10-03 23:22:02  Author:lautturi