/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package hello; /** * * @author Student */ public class BasicDemoException { public static void main(String[] args){ int value = 5; String xval = "a"; try{ for (int current =1; current<=10; current++){ value=value/0; } }catch(ArithmeticException ae){ System.out.println("attempt to divide by 0"); }finally{ System.out.println("Value = "+ value); } } }