mardi 1 août 2017

IF inside try block

I want to execute my method callmethod if the condition inside the IF statement is met. Else it should execute the catch block. But during implementation, if the condition is not met, it does not go to the catch block.

try{
if(count==0)
callmethod();
}
catch (Exception e){
System.out.println(e);
}

Aucun commentaire:

Enregistrer un commentaire