If we have list and we have to convert into array with datatype. Java provides method for this.
For ex: List<Long> var = new ArrayList<Long>();
We have convert this into Long array.
Conversion code:
Long[] varArray = var.toArray(new Long[var.size()]);
No comments:
Post a Comment