diff --git a/core-java-modules/core-java-arrays-guides/src/main/java/com/baeldung/array/arraystoreexception/ArrayStoreExceptionExample.java b/core-java-modules/core-java-arrays-guides/src/main/java/com/baeldung/array/arraystoreexception/ArrayStoreExceptionExample.java index ab485ca867..ce63fd6605 100644 --- a/core-java-modules/core-java-arrays-guides/src/main/java/com/baeldung/array/arraystoreexception/ArrayStoreExceptionExample.java +++ b/core-java-modules/core-java-arrays-guides/src/main/java/com/baeldung/array/arraystoreexception/ArrayStoreExceptionExample.java @@ -7,9 +7,8 @@ public class ArrayStoreExceptionExample { try { Object array[] = new String[5]; array[0] = 2; - System.out.println(array[0]); } catch (ArrayStoreException e) { - e.printStackTrace(); + // handle the exception } }