Ali Sidhu
Ali Sidhu

Reputation: 139

What is the difference between the methods PutExtra and PutExtras in Android?

What is the difference between PutExtra() method and PutExtras() method in Android?

Upvotes: 1

Views: 2549

Answers (2)

fre bern
fre bern

Reputation: 53

putExtra contains a key-value pair

putExtras contains a bundle which is a map(contains multiple key-value pairs)

Upvotes: 0

Chetan Joshi
Chetan Joshi

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

Related Questions