goto statement in Java

You can use for, do while, while cycle for example:

public void myFunction(){
 for (int i = 0; i < 1; i++) {
	// some code
       int c = 10;
       if(c==10)
         break; // goto stop; in C++
 } // end of for
 // stop: // break moved process to end of for
 
 
 
 // next code
 
}
This entry was posted in Android Examples Code and tagged . Bookmark the permalink.


Comments are closed.

2,093 views