Skip to content

Instantly share code, notes, and snippets.

@janosgyerik
Created May 1, 2020 10:55
Show Gist options
  • Save janosgyerik/c33a09da922e98c9f2b047c576fcb4a0 to your computer and use it in GitHub Desktop.
Save janosgyerik/c33a09da922e98c9f2b047c576fcb4a0 to your computer and use it in GitHub Desktop.
try (FileInputStream fis = new FileInputStream(path);
ObjectInputStream ois = new ObjectInputStream(fis)) {
Contact[] loaded = (Contact[]) ois.readObject();
System.out.println(Arrays.toString(loaded));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment