Parcelable Vs Serializable
Posted May 27, 2016
on:- In: Android Tutorials | Java Tutorials
- Comments Off on Parcelable Vs Serializable
Objectives :
- What is Parcelable?
- What is Serializable?
- What are the differences between Parcelable and Serializable?
- Explain : Parcelable Vs. Serializable
- What is Parcelable and Serializable in Android?
Parcelable Vs. Serializable
Parameter |
Parcelable | Serializable |
What is it? | Google developped Parcelable for better performance on android | Serializable is a standard Java interface |
Purpose | For marshaling and unmarshaling Java objects | For marshaling and unmarshaling Java objects |
Package | android.os | java.io |
Speed | 10 times Faster than Serializable because it is optimized for usage on android development | Slower than Parcelable |
Implementation Time | Requires more time than Serializable | Requires very less time as compared to Parcelable |
Degree of Implementation | Difficult | Easier than Parcelable |
Memory | Less temporary objects | Serializable interface create a lot of temporary objects and cause quite a bit of garbage collection |
Use with Intent | Parcelable array can be pass via Intent in android |
Cannot be used with Intent |
Tags: Aatul Palandurkar, Android Training in Chinchwad, Android Training in Dange Chowk, Android Training in Pune, Parcelable, Parcelable in Android, Parcelable Interface, Parcelable Interface in Android, Serializable, Serializable in Android, Serializable in Java, Serializable Interface, Serializable Interface in Android, Serializable Interface in Java, What is Parcelable?, What is Serializable?