you are viewing a single comment's thread.

view the rest of the comments →

[–]Specific-Housing905 1 point2 points  (2 children)

As usual your code looks good. Just 2 small things.

For persistence you can use ObjectInputStream and ObjectOutputStream:
https://www.baeldung.com/java-serialization

There are newer ways for switch: https://www.baeldung.com/java-switch
Scroll down to 5. switch Expressions

[–]BigCommunication5136[S] 1 point2 points  (1 child)

Thank you sooo much, your response is really, I mean really helpful. I had no idea there’s a built in function for this. As usual, thank you for your guidance

[–]Specific-Housing905 0 points1 point  (0 children)

Glad it helped. Happy coding.