MCQs>IT & Programming>Java>Suppose ArrayList x contains two strings [Beijing, Singapore]. Which method will cause the list to become [Beijing, Chicago, Singapore]?
Java MCQs
Suppose ArrayList x contains two strings [Beijing, Singapore]. Which of the following methods will cause the list to become [Beijing, Chicago, Singapore]?
Answer
Correct Answer: x.add(1, "Chicago")
Explanation:
Note: This Question is unanswered, help us to find answer for this one