An ad agency is interested in keeping track of their clients a little more easily. Help…
- User
An ad agency is interested in keeping track of their clients a little more easily.
Help them out by creating two ArrayLists:
Create an ArrayList called companyName that stores an ArrayList of all the company names. Create an Integer ArrayList called contractValue that stores the value of the contract that the ad agency has with its clients. import java.util.ArrayList; public class Agency { public static void main(String[] args) { //Initialize your ArrayLists here!
code}}
- Assistant
Certainly! To create the ArrayLists as requested, you can use the following code snippet. This code will initialize both the
companyNameandcontractValueArrayLists within themainmethod of theAgencyclass. To demonstrate functionality, I will also include a section where we add a couple of example entries to both lists.java