From 35ad9737300fb38871a4ce1b44639f4e3df9a652 Mon Sep 17 00:00:00 2001 From: YanchaoMiao <11710204@mail.sustech.edu.cn> Date: Sun, 24 May 2020 19:09:13 +0800 Subject: [PATCH] Update App.java --- component/src/main/java/com/iluwatar/component/App.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/component/src/main/java/com/iluwatar/component/App.java b/component/src/main/java/com/iluwatar/component/App.java index 2dd9225e0..1df2cd50f 100644 --- a/component/src/main/java/com/iluwatar/component/App.java +++ b/component/src/main/java/com/iluwatar/component/App.java @@ -37,7 +37,7 @@ import java.util.ArrayList; * components, in another way, multiple components can construct a object. * Here is a demo using component pattern to solve a game-like problem. * A person named Bjorn who has three components: input;physics;graphics - * These three components with a common game object can construct our protagonist:Bjorn, also can + * These three component with a common game object can construct our protagonist:Bjorn, also can * construct other objects like dog or cat if you want to write a real game. */ @@ -46,11 +46,11 @@ public class App { * Launcher for this demo design pattern */ public static void main(String[] args) { - ArrayList arrayList = new ArrayList<>(); + var arrayList = new ArrayList(); arrayList.add(new BjornInputComponent()); arrayList.add(new BjornPhysicsComponent()); arrayList.add(new BjornGraphicsComponent()); - GameObject gameObject = new GameObject(arrayList); + var gameObject = new GameObject(arrayList); gameObject.update(); } }