power_settings_new
long[] longs = new long[]{finalid1};

Long[] longObjects = Arrays.toObject(longs);

List<Long> longList = java.util.Arrays.asList(longObjects);

Is this correct ?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

by (171 points)
0 votes

Yes, what you are trying to do is, convert Array of Primitives to Array of containers and store it into list. Here is your correceted code.

long[] longs = new long[]{11L, 2L};
Long[] longObjects = ArrayUtils.toObject(longs);
List<Long> longList = java.util.Arrays.asList(longObjects);
 
Hope that helps.
add
...