iterate through the characters of string in java

w‮tual.ww‬turi.com
iterate through the characters of string in java
/**
 * @author lautturi.com 
 * Java example: Traversal character in string
 */

import java.util.*;

public class Lautturi {

	public static void main(String[] args) {

		String str = "hello lautturi java world!";
		for (int i = 0; i < str.length(); i++){
		    char c = str.charAt(i);        
		    System.out.println(c+"");
		}
		
	}

}
Created Time:2017-09-23 20:03:07  Author:lautturi