0

while looking at the description of the method:

setMultiChoiceItems(CharSequence[] items, boolean[] checkedItems, DialogInterface.OnMultiChoiceClickListener listener) ,

i was thinking that why can't we use an array of "string" type as a first argument of the method. Because acc. to the description of the method, charsequence[]= the text of the items to be displayed in the list. So, can't we use here a string array?

1
  • Here's the actual dup: What is the difference between CharSequence[] and a String[]? Commented Feb 13, 2018 at 20:52

1 Answer 1

1

But you can use a String[] here, too.

CharSequence is an interface that String implements.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.