HI, a pretty frustrating problem arose. I am not going to post any code this time. This should be straight forward question anyways... :)
I have a class that contains a constructor with arrays. Also, a methods to add to the array using scanner class.
The problem is, I implemented serialization in that class. When I instantiated that class inside the main method as an object, I tried to save it to a file via Serialization. But when the code to save the file is ran, it throws an exception like this:
java.io.NotSerializableException : java.util.scanner
How do I fix this problem?? I checked the Java API and it says that scanner is Serializable.
I pray that I don't need to delete the scanner objects.