The problem of hiding data with serialization in the context of OOP is indicated by @candiru.
But there is another aspect: Serialization .
You can send a serialized file over the network so that it can be snooped, and things that should be private can be easily compromised.
Below is the content of the Bean class that I serialized (using the default method). I could view the contents by opening the serialized file in a text editor.
ยฌรญ sr SerializationPractice1 I ageL extrat Ljava/lang/String;L nameq ~ xp
pt SidKumarq ~ x
Now you can easily find below things without even knowing about the class:
- Class Name: SerializationPractice1
- String attribute named name - SidKumar
You may notice these things for sure; other details are not so clear. And the above information is correct.
rai.skumar
source share