lr13 -> task_1 -> e1-e14
This commit is contained in:
17
lr13/task_1/e13.java
Normal file
17
lr13/task_1/e13.java
Normal file
@@ -0,0 +1,17 @@
|
||||
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("Индекс не существует");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user