String str = "hello lautturi world!"; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); }