This question already has an answer here:
How do I replace the following array with an ArrayList.
Employee[] companyTeam = {manager, engineer1, superviso1, accountant, intern };
This question already has an answer here: How do I replace the following array with an ArrayList.
|
|||
marked as duplicate by Jonathan, Steve Kuo, TheLittlePig, Alexander, qaphla Apr 4 at 3:59This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||
You can do something like
|
|||||||||||||||||||||
|
You already have an array, So you can use |
|||
|
java.util.ArrayList
check the duplicate question (above). FYI,Arrays.asList
really returns anArrays.ArrayList
, although that might not matter. – Jonathan Jan 23 at 14:50