I have a method that returns an ArrayList and in the Main method i want to convert that list to an array.
Code:
public static void main (String[] args)
{
**How can I turn the scoresList which is returned from the AddScores method. into an Array?**
}
public static ArrayList AddScores()
{
ArrayList<Double> scoresList = new ArrayList<Double>();
scoresList.add(32.3);
scoresList.add(34.3);
scoresList.add(32.6);
return scoresList;
}
Comment