18 lines
515 B
Java
18 lines
515 B
Java
package lr13.task_1;
|
|
|
|
public class e13 {
|
|
public static void main(String[] args) {
|
|
try {
|
|
int l = args.length;
|
|
System.out.println("размер массива = " + l);
|
|
|
|
int h = 10 / l;
|
|
args[l + 1] = "10";
|
|
} catch (ArithmeticException e) {
|
|
System.out.println("Деление на ноль");
|
|
} catch (ArrayIndexOutOfBoundsException e) {
|
|
System.out.println("Индекс не существует");
|
|
}
|
|
}
|
|
}
|