Question: Java Exercise 1 Create a file named A10.java. Place all your code in this file.Create a public static ArrayList of integers named intList. Define a
Java
Exercise 1
Create a file named A10.java. Place all your code in this file.Create a public static ArrayList of integers named intList.
Define a public static method addNumber(int i) that adds i to your list.
Exercise 2
Create a public static HashMap of integers, integers named intMap.
Define a public static method addPair(int i,int j) that adds i,j to your HashMap (make i the key and j the value).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
