Question: Help me with a simple error in my code dealing with ArrayLists: Here's my code: import java.util.ArrayList; public class Checkout { private int size; private
Help me with a simple error in my code dealing with ArrayLists:
Here's my code:
import java.util.ArrayList;
public class Checkout { private int size; private int amount; private int sum; private double taxRate; private ArrayList
This is the error code I get for the bolded line of code:
The type of the expression must be an array type but it resolved to ArrayList
Step by Step Solution
There are 3 Steps involved in it
In your code the error arises from a misunderstanding of how to access elements in an ArrayList Unli... View full answer
Get step-by-step solutions from verified subject matter experts
