Reputation: 139
What is the difference between PutExtra()
method and PutExtras()
method in Android
?
Upvotes: 1
Views: 2549
Reputation: 53
putExtra contains a key-value pair
putExtras contains a bundle which is a map(contains multiple key-value pairs)
Upvotes: 0
Reputation: 5711
Both methods are Intent by help of
PutExtra()
- we can store any primitive data type directly with (key,value) pair.
And PutExtras()
- hold object of Bundle
class object .
Bundle
class provide us method of specific primitive data type methods to store data in it.
and put Bundle object in PutExtras()
method without key value pair.
Upvotes: 3