I have the following fragment of code:
public void doSomething() {
float array[] = new float[2];
array[0] = (float) 0.0;
array[1] = (float) 1.2;
someMethod(array);
}
public void someMethod(Object value) {
//need to convert value to List<Float>
}
As you can see above I want to convert the value variable which is an array (but passed as an Object) to List. I tried the following as suggested here: Create ArrayList from array
new ArrayList<Float> (Arrays.asList(value));
however, it does not compile.
Any hints?