Tag Archives: cycle

2,697 views

The Labeled continue statement Java example

The Labeled continue statement as goto Java example. public class MainClass { public static void main(String[] arg) { String[] arrayOfString = { "Hello", "people", "hello", "world!" }; OuterLoop: for (int e = 0; e < 4; e++) { for (int … Continue reading

Posted in Android Examples Code | Tagged , , , , , | Comments Off on The Labeled continue statement Java example
7,435 views

do while cycle Java basic example

do while Java example public class MainClass { public static void main(String[] arg) { String[] arrayOfString = { "Hello", "people", "hello", "world!" }; int i = 0; // first cycle is always executed do { System.out.println("Loop: " + i); System.out.println(arrayOfString[i]); … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on do while cycle Java basic example
2,375 views

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]); … Continue reading

Posted in Android Examples Code | Tagged , , , , , | Comments Off on While cycle loop in Java example
3,911 views

For cycle loop in Java example

Cycle for in Java example public class MainClass { public static void main(String[] arg) { String[] arrayOfString = { "Hello", "people", "hello", "world!" };   for (int i = 0; // start position , first cycle i == 0 i … Continue reading

Posted in Android Examples Code | Tagged , , , , , , , | Comments Off on For cycle loop in Java example
24,881 views

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);   } }

Posted in Android Examples Code | Tagged , , , , , | Comments Off on Foreach loop cycle in Java Android example