From db5fe4c6f0013471c25e05e625a2548710dcd111 Mon Sep 17 00:00:00 2001 From: Jesus Date: Mon, 17 Oct 2022 21:08:34 +0200 Subject: [PATCH] Minor changes --- .../java/com/jesuspinar/miobjeto/serializable/Main.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/jesuspinar/miobjeto/serializable/Main.java b/src/main/java/com/jesuspinar/miobjeto/serializable/Main.java index c8ee55e..031781c 100644 --- a/src/main/java/com/jesuspinar/miobjeto/serializable/Main.java +++ b/src/main/java/com/jesuspinar/miobjeto/serializable/Main.java @@ -18,10 +18,12 @@ public class Main { data.add(new Person("Jorge", 2)); data.add(new Person("Pepe", 89)); - boolean isWrited = ObjWriter.write(data,file); + //Check writing + boolean isWritten = ObjWriter.write(data,file); + //Test serialization People dat = null; - if (isWrited) { + if (isWritten) { dat = (People) ObjReader.read(file); } if (dat != null){