Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How does marking a field as transient makes it possible to serialize an object?

Pragya Keshap answered on February 4, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers


How does marking a field as transient makes it possible to serialize an object?

0

Let say we have a class ABC that implements Serializable

interface, but it contains a member variable object of class XYZ

that does not implement Serializable interface. Due to this it is not

possible to Serialize the class ABC.

To solve this issue, we can mark the member variable XYZ as

Transient in class ABC. This will allow us to serialize the class

ABC.

https://www.baeldung.com/java-transient-keyword

Popularity 1/10 Helpfulness 1/10 Language java
Source: Grepper
Link to this answer
Share Copy Link
Contributed on Feb 04 2023
Pragya Keshap
0 Answers  Avg Quality 2/10


X

Continue with Google

By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
X
Grepper Account Login Required

Oops, You will need to install Grepper and log-in to perform this action.