How to convert List to long[] or vise versa?

Thursday, January 12th, 2012  »  Posted By  »  Total 1 Comment

There is no automatic conversion from array of primitive type to array of their boxed reference types or vise versa. You have to iterate for each data. Converting List<Long> to long[] 1 2 3 4 5 6 7 List<Long> input = getSomeLongs(); // Assume some values long[] output = new long[input.size()]; int index = 0; […]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: