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

3

u/ankit_jajajaja Feb 07 '21

Hey guys i am mostly confused with this word Lazy. I hear it many times like lazy initialisation. What does it means ?

5

u/tiedor Feb 07 '21

Don't know what is the meaning in OP's question. But generally speaking, is lazy when it's done only when needed. It's the opposite of eager, meaning it's done as soon as possible, even if you will end up with not needing it.