Computer Science, asked by rairakshanda6683, 1 year ago

What's the difference between parcelable and serializable? Which one is better? Why?

Answers

Answered by rumanaperween1977
3

Answer:

Explanation:

Serializable

Serializable is a markable interface or we can call as an empty interface. It doesn’t have any pre-implemented methods. Serializable is going to convert an object to byte stream. So the user can pass the data between one activity to another activity. The main advantage of serializable is the creation and passing data is very easy but it is a slow process compare to parcelable.

parcelable is better.

Because Parcelable

Parcel able is faster than serializable. Parcel able is going to convert object to byte stream and pass the data between two activities. Writing parcel able code is little bit complex compare to serialization. It doesn’t create more temp objects while passing the data between two activities.

Parcelable. Parcel able is faster than serializable. Parcel able is going to convert object to byte stream and pass the data between two activities. Writing parcel able code is little bit complex compare to serialization

Answered by waniakazmi2009
1

Answer:

The upper answer is correct

Similar questions