From 71b9fd959aeb0b66e513c8965993db69d70ba58c Mon Sep 17 00:00:00 2001 From: gupta-ashu01 <30566001+gupta-ashu01@users.noreply.github.com> Date: Sun, 30 Aug 2020 14:19:34 +0530 Subject: [PATCH] Update ArrayStoreExceptionExample.java --- .../array/arraystoreexception/ArrayStoreExceptionExample.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 } }