Hello, guys, i need some advices.
Propose another ways serialization objects in
java.
This is for studying, not for practical using.
I have couples opinion, first- Output stream- printWrite, and add to every classes, instance variables its personal tag, something like:
1) Class cat{
Integer weight;
String name;
}
Then file with dates will be :
<<ObjectClass> cat
<weight> weight ( number, off course that represents this weight)
<name> Jack
<ObjectClass>>
where << and >> bound one object.
2) Other realization is to collect all NAME of instance variables in one array list for example, and then sort them by alphabet.
It helps us such way- we needn't to write Name of every variables, because they will be added in strict sequence, and then can be read in the same order :
<<cat>12; Albert>>
Please, estimate, criticize and offer your variants!))