Saving Java Objects

Опубликовано: 27 Май 2026
на канале: Dave Kirkwood
3,045
78

Saving java objects to a file. In Java, there are several techniques for saving objects to a file. There are many reasons why you might want to save the state of an object to a file and load it back later.

In this video, I explain three techniques:

1) Objects can be serialized and the state can be saved directly into a Binary file. This creates a small and simple file and does not require any special Java imports.

2) Objects are saved as XML. This is useful as it is human readable and editable. The XML can also be understood by other programming languages.

3) Objects are saves as JSON. This has the same benefits as XML.