+ 1
Is it necessary to use static methods in throws declaration
Describe briefly please
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;
}
}
0
تازال