Foreach loop cycle in Java Android example

Foreach in Java basic example source code.

MainClass.java

 
public class MainClass {
	public static void main(String[] arg) {
		String[] arrayOfString = { "Hello", "people", "hello", "world!" };
 
		for (String s : arrayOfString)
			System.out.println(s);
 
	}
}
This entry was posted in Android Examples Code and tagged , , , , , . Bookmark the permalink.


Comments are closed.

22,944 views