Try-Catch-Finally

class trycatchfinally
{
  public static void main(String[] args) {

  try {
   int a,b,c;
a=5;
b=0;
c=a/b;
  }
  catch (Exception e) {
    System.out.println("Divide By Zero");
  }
 
finally {
    System.out.println("finally block will execute always.");
  }
  }
}



1 comment:

pascalieagleston said...

Hotel El Yucateco Resort & Casino - Mapyro
Discover cheap deals for El Yucateco Resort 당진 출장안마 & Casino in 당진 출장안마 El Yucateco starting at $32. Save 구리 출장안마 up to 60% 서울특별 출장안마 off with our Hot Rate deals when booking a last 청주 출장마사지 minute hotel