MarkLoveExEx
asked on
Pass in JList instead of hard-coding numbers
I have the following code that calls a class "m", passing in a List (and a double) as follows...
Notice that the List is hard-coded. I need to pass in a List variable somehow, but I can't get it to work. The "asList" seems to need that hard-coded list of numbers within parenthesis. Any suggestions?
my_outlier = (double) m.getOutlier(Arrays.asList(1.1, 2.1, 31.1, 4, 3, 4), 0.95)
Notice that the List is hard-coded. I need to pass in a List variable somehow, but I can't get it to work. The "asList" seems to need that hard-coded list of numbers within parenthesis. Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER