+ 1

Is it necessary to use static methods in throws declaration

Describe briefly please

29th Nov 2019, 8:14 AM
Gayatri Devi
Gayatri Devi - avatar
3 ответов
+ 1
this method() has throws declaration and method() is non-static public class Program { public static void main(String[] args) { new Program().method(); } void method() throws ArithmeticException { int a =1; int b =a/0; } }
29th Nov 2019, 6:33 PM
zemiak
0
تازال
30th Nov 2019, 4:53 PM
ندوة الضاهر
ندوة الضاهر - avatar