diff --git a/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java b/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java index b69660e..b711d9f 100644 --- a/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java +++ b/src/main/java/dev/struchkov/example/debugger/box/SurpriseBox.java @@ -1,6 +1,6 @@ package dev.struchkov.example.debugger.box; -public class SurpriseBox { +public final class SurpriseBox { public static void surpriseOne(int i) { if (i == 896) { diff --git a/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java b/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java index 01b1edc..73caf3e 100644 --- a/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java +++ b/src/main/java/dev/struchkov/example/debugger/one/ExampleOne.java @@ -6,7 +6,9 @@ public class ExampleOne { public static void main(String[] args) { final ExampleOne exampleOne = new ExampleOne(); + System.out.println("\n\nПрограмма запущена"); exampleOne.demo(); + System.out.println("Программа выполнена"); } private void demo() { diff --git a/src/main/java/dev/struchkov/example/debugger/two/FooService.java b/src/main/java/dev/struchkov/example/debugger/two/FooService.java index 905d939..f1462af 100644 --- a/src/main/java/dev/struchkov/example/debugger/two/FooService.java +++ b/src/main/java/dev/struchkov/example/debugger/two/FooService.java @@ -7,12 +7,12 @@ public class FooService { public void example() { for (int i = 0; i < 1000; i++) { - testMethod(i); + noSurpriseMethod(i); SurpriseBox.surpriseOne(i); } } - private void testMethod(int i) { + private void noSurpriseMethod(int i) { if (i == 100) { try { throw new SurpriseException("Упс");