In java I want to jump from a particular block of Statements to another block of statements. How can I achieve it? -


public class abc{     public static void main(){        try{                int =10;                if(a=10){                throw new exception();        }                l1:system.out.println(a);        }catch(exception e){                continue l1;        }     } } 

actually trying when exception occurs wish continue next statement after well. there way can achieve java?

you want put system.out.println(a); in catch block.

putting in block mean executed when exception not occur. program goes catch block when exception occurs.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -