Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2012
    Posts
    6
    Rep Power
    0

    Default Convert List of Integer Objects to primitive int array

    Hi Experts,

    I have started learning java recently and looking into some practice exercise. Just wante to know if there is a easy way, to convert a List of java.lang.Integer objects to array of primitive int type (not integer).

    Something like List<Integer> to int []? Or I need to loop through each element in list and convert it?

    Please let me know.

    Please feel free to move this thread to right location just in case I have posted this in the wrong place. Thanks in advance.

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,663
    Blog Entries
    7
    Rep Power
    21

    Default Re: Convert List of Integer Objects to primitive int array

    What didn't you like about my reply in your other thread? Please stay in one thread for one problem; I'm closing this thread.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Convert List of Integer Objects to primitive int array
    By StephenHawking9 in forum New To Java
    Replies: 1
    Last Post: 06-16-2012, 08:07 AM
  2. Replies: 1
    Last Post: 10-16-2011, 09:58 AM
  3. How to convert array of Objects into array of Strings
    By elenora in forum Advanced Java
    Replies: 1
    Last Post: 06-10-2011, 03:48 PM
  4. Replies: 1
    Last Post: 04-19-2011, 04:32 PM
  5. How to convert List to Array
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-16-2008, 10:37 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •