r/javahelp • • Feb 07 '21

Unsolved Serialisation Java8

Yesterday i took an interview where i was asked "why serialisation is said to b lazy" ?

I certainly could not answer this as i have never ever come across anything where the serialisation is considered lazy. After the interview i did a quick google and yet no ans.

Can anyone please help know the right ans for this with detailed explanation

java8

22 Upvotes

21 comments sorted by

View all comments

8

u/nutrecht Lead Software Engineer / EU / 20+ YXP Feb 07 '21

Generally, if you don't understand a question, it's best to simply ask what they mean exactly. If you're just going to guess, you're probably going to guess wrong.

In this case, it's a strange question. While serialization can be tied to lazy loading, there's no hard link to serialization and lazy loading. Serialize happens when you 'do' it, not before, not after.

0

u/[deleted] Feb 07 '21

[deleted]

2

u/nutrecht Lead Software Engineer / EU / 20+ YXP Feb 07 '21

Which is what I said in the piece you cut from my quote. If it’s unclear; ask.