import java.util.logging.Level; import java.util.logging.Logger; public class LogExample { private static final Logger LOGGER = Logger.getLogger(LogExample.class.getName()); public static void main(String[] args) { try { int result = divide(10, 0); } catch (ArithmeticException e) { } } private static int divide(int num1, int num2) throws ArithmeticException { if (num2 == 0) { } return num1 / num2; } }


上一篇:
下一篇:
切换中文