lr13 -> task_1 -> e1-e14

This commit is contained in:
2026-05-23 16:50:10 +05:00
parent 7310b240fd
commit 7c4e17e1b1
14 changed files with 230 additions and 0 deletions

20
lr13/task_1/e12.java Normal file
View File

@@ -0,0 +1,20 @@
package lr13.task_1;
public class e12 {
public static void m(String str, double chislo) {
try {
if (str == null) {
throw new IllegalArgumentException("Строка введена неверно");
}
if (chislo > 0.001) {
throw new IllegalArgumentException("Неверное число");
}
} catch (IllegalArgumentException e) {
System.out.println("Error: " + e);
}
}
public static void main(String[] args) {
m(null, 0.000001);
}
}