JAVA How to save object to text file (OOP)

preview_player
Показать описание
Simple Java example on how to save object (all of its private fields) to plain text file using Object Output Stream and to construct other object from this file using Object Input Stream.
=====================================
=====================================
Рекомендации по теме
Комментарии
Автор

Exactly what I was needing, couldn't figure out how to save an object like this. Cheers mate.

StarGazerTom
Автор

exactly what was looking for, awesome

syedbaryalay
Автор

Simple. Easy to understand. Thanks so much.

freespeechisdead
Автор

this will save me so much space and time

jobliar
Автор

Is there any way to save it in a specific directory ??

athenanaki
Автор

Can I use this for String[][]? and on NetBeans jButtons?

eyoggtv
Автор

How to do this as a method in a class?

obenrob
Автор

But my file donot reading next object what should i do

fajarkhan
Автор

how can I do to save the objects in the column text file?

pablo-elraton