Question: Please. Question.2: Write a Java program that creates an ArrayList that can hold string objects. (Chapter-4, Iarks-2) Add the names of three cars to the

Question.2: Write a Java program that creates an ArrayList that can hold string objects. (Chapter-4, Iarks-2) Add the names of three cars to the ArrayList, and then display the contents of the ArrayList. Question.3: Write a Java Program to implement following (ChapterMarks-3) a) Create a HashMap object called capitalCities that will store following values of types, String keys and String values. ("England", "London") ("Germany", "Berlin") ("Norway", "Oslo") b) Print all the items from capitalCities c) Remove single item from the capitalCities d) Remove All items from the capitalCities on.3: Write a Java Program to implement following (Chapter- a) Create a HashMap object called capitalCities that will store following values of types, String keys and String values. ("England", "London") ("Germany", "Berlin") ("Norway", "Oslo") b) Print all the items from capitalCities c) Remove single item from the capitalCities d) Remove All items from the capitalCities
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
