Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Serialization Issue in Java

I have a data type that contains long timestamps, a hashmap , Set and another double array. I serialized this data type and didn't get any exception while running however, When I read that file, map and double array comes out to be null? Basically I can print out the numbers to the console before writing but double arrays and map are null. Sorry if I explained this badly. I have been working on this for a while now...

What seems to be the problem? What are the NotSerializable classes? Is there any way of making it serializable?

Thanx for taking your time.


1 Answers

This answer may be far too basic, but check whether your fields are not transient nor static.

like image 173
Cotta Avatar answered Jul 22 '26 11:07

Cotta