class Demo{ public static void main(String[] args){ int x = 0; try{ x = div(1,2); }catch(Exception e){ System.out.println(e); } System.out.println(x) ; } public static int div(int a,int b){ return a / b ; } }
class Demo{ public static void main(String[] args){ int x = 0; try{ x = div(1,2); }catch(Exception e){ System.out.println(e); } System.out.println(x) ; } public static int div(int a,int b){ return a / b ; } }
发布时间:2024-10-13 06:20:29