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; for(Long val : input) { indexess[index] = val; index++; } |
Converting long[] to List<Long>
1 2 3 4 5 | long[] input = getSomeLongs(); // Assume some values List<Long> output = new ArrayList<Long>(); for(long val : input){ lst.add(val); } |
Description :
This is the one stop educational site for all Electronic and Computer students. If you want to learn something new then we are here to help. We work on Microcontroller projects, Basic Electronics, Digital electronics, Computer projects and also in basic c/c++ programs.
#Home #Sitemap #Resources #Terms of Use
Copyright©2012 electrofriends.com All Rights Reserved
Contact:info@electrofriends.com
Hey renjith
Can you help me in the project which is same as yours.. but il be using 8051 micro controller.
can you send me some more details of your project?
i mean documentary stuff lyk block diagram n al.
hoping to see a reply from you.
regards
Akshata