From 20d6dbaef31bd1acb8e0a1baac09f214318b84af Mon Sep 17 00:00:00 2001 From: Niket Agrawal Date: Thu, 28 Sep 2023 11:14:33 +0530 Subject: [PATCH] Updating spelling mistake --- .../list/multipleobjecttypes/AlternativeMultipeTypeList.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-java-modules/core-java-collections-array-list-2/src/main/java/com/baeldung/list/multipleobjecttypes/AlternativeMultipeTypeList.java b/core-java-modules/core-java-collections-array-list-2/src/main/java/com/baeldung/list/multipleobjecttypes/AlternativeMultipeTypeList.java index f073ea4eab..5315147dff 100644 --- a/core-java-modules/core-java-collections-array-list-2/src/main/java/com/baeldung/list/multipleobjecttypes/AlternativeMultipeTypeList.java +++ b/core-java-modules/core-java-collections-array-list-2/src/main/java/com/baeldung/list/multipleobjecttypes/AlternativeMultipeTypeList.java @@ -31,10 +31,10 @@ public class AlternativeMultipeTypeList { // List via Functional Interface List dataList = new ArrayList<>(); - Predicate myPricate = inputData -> (inputData instanceof String || inputData instanceof Integer); + Predicate myPredicate = inputData -> (inputData instanceof String || inputData instanceof Integer); UserFunctionalInterface myInterface = (listObj, data) -> { - if (myPricate.test(data)) + if (myPredicate.test(data)) listObj.add(data); else System.out.println("Skipping input as data not allowed for class: " + data.getClass()