While cycle loop in Java example

While cycle Java basic example with array of strings.

MainClass.java

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


Comments are closed.



2,602 views