logo

Crowdly

2.2  Write a Java program that: Creates an ArrayList<String> to store names ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

2.2 Write a Java program that:

  • Creates an ArrayList<String> to store names of five programming languages.
  • Adds the following languages to the list: "Java", "Python", "C++", "JavaScript", "Ruby".
  • Replaces "C++" with "C#" in the list.
  • Displays all the elements of the updated list
  • Displays the total number of elements in the list.

(15 marks)

More questions like this

Want instant access to all verified answers on learning.richfield.ac.za?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!