public class PrintAverageMain { public static void main (String[ ] args) { new PrintAverageMain().printAverage(); } // method main public void printAverage () { try { System.out.println (getAverage()); } // try catch (ArithmeticException e) { System.out.println (e); } // catch } // method printAverage public int getAverage () { int sum = 35; int n = 0; return sum / n; } // method getAverage } // class PrintAverageiMain