I don’t understand the problem you have since an ArrayList
implements a List
with List
being an interface.
You can change this line
ArrayList<String> orderNumbers = new ArrayList<String>();
to:
List<String> orderNumbers = new ArrayList<String>();
Related Posts:
- Convert list to array in Java [duplicate]
- Converting array to list in Java
- What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it?
- Java Error “Exception in thread “main” java.util.InputMismatchException” On an Array program
- Create ArrayList from array
- Print ArrayList
- Print ArrayList
- Working with a List of Lists in Java
- Array ArrayList python equivalent
- How to convert jsonString to JSONObject in Java
- what does “>>>” mean in java?
- How to convert List
to int[] in Java? - How to convert an ArrayList containing Integers to primitive int array?
- How to convert int[] into List
in Java? - In Java, how to append a string more efficiently?
- Print ArrayList
- ow to create a histogram in java
- How can I create an Array of ArrayLists?
- Java ArrayList for integers
- java.lang.ArrayIndexOutOfBoundsException: 4 Error
- Add String Array to ArrayList
- Java says this method has a constructor name
- Using the Pythagorean theorem with Java
- How to initialize an array in Java?
- When to use LinkedList over ArrayList in Java?
- How do I declare and initialize an array in Java?
- What’s the simplest way to print a Java array?
- Initialization of an ArrayList in one line
- How to sort an ArrayList?
- How to print elements in a vector c++
- What is the difference between String[] and String… in Java?
- “Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 0, Size: 0″ with ArrayList?
- Are vectors passed to functions by value or by reference in C++
- How do I declare a 2d array in C++ using new?
- How to split a String by space
- Does JavaScript have a method like “range()” to generate a range within the supplied bounds?
- Make copy of an array
- Does JavaScript have a method like “range()” to generate a range within the supplied bounds?
- How to create a sub array from another array in Java?
- how to fix java.lang.IndexOutOfBoundsException
- how to iterate in List
- > in java and set their values as we do in a normal int a[i][j] matrix type [duplicate]
- Double array initialization in Java
- Array of arrays (Python/NumPy)
- Java – Best way to print 2D array?
- I want to declare an empty array in java and then I want do update it but the code is not working
- Calculating Standard Deviation & Variance in C++
- What is the difference between String[] and String… in Java?
- Javascript Uncaught TypeError: Cannot read property ‘0’ of undefined
- What is a list in Bash?
- What does ** do in C language?
- Convert array of strings into a string in Java
- How do I do a deep copy of a 2d array in Java?
- Returning an empty array
- How to create an empty array?
- How do I create an array of strings in C?
- Java – Best way to print 2D array?
- HashSet vs. ArrayList
- What is the difference between a null array and an empty array?
- method in class cannot be applied to given types
- Are arrays passed by value or passed by reference in Java?
- What does << mean in Ruby?
- Error: cannot find symbol ArrayList
- Initialization from incompatible pointer type warning when assigning to a pointer
- “Cannot create generic array of ..” – how to create an Array of Map
? - Convert String to int array in java
- “Actual or formal argument lists differs in length”
- Bubble sort algorithm in MIPS
- Java Comparator class to sort arrays
- Resize an Array while keeping current elements in Java?
- How to sort an array of objects in Java?
- Error: unsupported use of matrix or array for column indexing
- Using multiple variables in a for loop in Python
- How to get the last value of an ArrayList
- Weighted random selection from array
- How to make an array of arrays in Java
- How to add an object to an ArrayList in Java
- Empty an array in Java / processing
- Java read file and store text in an array
- Getting the array length of a 2D array in Java
- Checking to see if array is full
- How to sort an array in Bash
- How to use ArrayUtils for array of objects, it doesn’t delete the content of an array
- Error array dimension missing
- Printing char arrays in Java
- Fill an array with random numbers [duplicate]
- Size has private access in ArrayList
- How to write a test class to test my code?
- Printing array elements with a for loop
- Java ArrayList of Doubles
- How do I initialize a byte array in Java?
- How to increase the size of an array in Java?
- Difference between char *argv[] and char **argv for the second argument to main()
- Array to Hash Ruby
- convert string to arraylist
in java - What is the difference between ArrayList.clear() and ArrayList.removeAll()?
- ArrayList of int array in java
- How Do I Implement an Insertion Sort Method for A Generic ArrayList?
- toring and Retrieving ArrayList values from hashmap
- variably modified array at file scope in C
- Numpy matrix to array