From 79244d17e7993a4178098cfa2d1e1df4dd9efb92 Mon Sep 17 00:00:00 2001 From: corrado Date: Thu, 18 May 2017 18:42:10 +0200 Subject: [PATCH] Update SerializeObject.java The import java.io.IOException is never used No reason for the transient attribute to be public --- Lesson3/IO/Example of files and IO/SerializeObject.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lesson3/IO/Example of files and IO/SerializeObject.java b/Lesson3/IO/Example of files and IO/SerializeObject.java index d225ece..c954e9e 100644 --- a/Lesson3/IO/Example of files and IO/SerializeObject.java +++ b/Lesson3/IO/Example of files and IO/SerializeObject.java @@ -1,4 +1,3 @@ -import java.io.IOException; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.ObjectInputStream; @@ -41,7 +40,7 @@ public static void main(String[] args) throws Exception { class UserProfile implements java.io.Serializable { private String name, email, themecolor; - public transient String something; + private transient String something; public UserProfile(String name, String email, String themecolor, String something){ this.name = name; @@ -56,4 +55,4 @@ public String toString(){ "\nTheme Color: " + themecolor + "\nSomething (transient): " + something; } -} \ No newline at end of file +}