Title: Java jGrasp - Serialization - Lesson 2
Duration: 15:24 min
Description: Here we finish the application by providing a complete menu driven application that prompts the user for options. Based on the user's selection, we trigger methods that save the ArrayList to a file using writeObject in the ObjectOutputStream class, and retrieve the data from the file using readObject in the ObjectInputStream class and display the result on the screen.
Methodology: Using libraries to serialize objects.
Technologies: Object-oriented programming, Serialization.
Examples constructed: Here we continue the example we started in the previous video. We construct the switch statement the calls the appropriate method based on the user's selection. We check for invalid input. Our example is able to add employees and managers to an ArrayList, save the list to a file (using serialization), and print results on the screen.
Key words: Exceptions, try, catch, PrintStackTrace, classes, serialization, ArrayList, ObjectOutputStream, writeObject.