I need to exist from a method in a point how can I do that in Java?
void print(){
try{
coding...
//I need to exist from the print method here.
}catch(){}
}
Use return
statement without a return value :
void print(){
try{
coding...
return;
}catch(){}
}