Tag Archives: for

13,914 views

Goto labeled statement in Java example

Goto in for cycle Java example source code. MainClass.java public class MainClass { public static void main(String[] arg) { String[] arrayOfString = {"nothing", "Hello", "people" , "bye-bye", "hello", "world!", "end" };   OuterLoop: for (int i = 0;i<6; i++) { … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on Goto labeled statement in Java example
3,264 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
3,672 views

Continue statement Java example

For and continue statement in Java. public class MainClass { public static void main(String[] arg) { String[] arrayOfString = { "Hello", "people", "hello", "world!" };   for (int i = 0; i < arrayOfString.length; i++){ if(arrayOfString[i].equals("hello")) continue; // skip to … Continue reading

Posted in Android Examples Code | Tagged , , , , | Comments Off on Continue statement Java example
4,450 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
25,527 views

Get assets folder files to array of strings Android example

Get assets folder files to array of strings. Its show files in assets folder and sub folders: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);   final AssetManager assetManager = getAssets(); try { // for assets folder add empty string String[] … Continue reading

Posted in Android Examples Code | Tagged , , , , , , , | Comments Off on Get assets folder files to array of strings Android example