Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
easy Solved by 4 students

ArrayList Add Method Type Compatibility

< Prev
Next >

Consider the following declarations.

ArrayList<Character> charList = new ArrayList<Character>();
String s = "A";
int num = 65;

Which of the following statements will cause a compilation error?

A

charList.add(s);

B

charList.add(s.charAt(0));

C

charList.add(Character.valueOf(‘C’));

D

charList.add((char) num);

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question
Mark for review

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1kaisuki11 0m 00s 100
#2bommasam00012 0m 33s 57
#3y.seong202712 1m 04s 26
#4singhris00014 1m 58s -48
Items per page:
10
1 – 4 of 4
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|FAQ