Results 1 to 2 of 2
  1. #1
    tyang is offline Member
    Join Date
    Jan 2010
    Rep Power

    Default Vector object into array

    Can anyone tell me how I can change the Vector object into array?

    One simple example:
    Vector<Integer> a = new Vector<Integer>();
    for (j=0; j<numTrainInstance; j++) a.add(j);

    How can I change a into int[]?

    Your help will be very much appreciated!

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

Similar Threads

  1. How to convert the Vector object into an array?
    By tyang in forum New To Java
    Replies: 4
    Last Post: 02-08-2010, 09:00 AM
  2. How can I cast object to Vector?
    By batya in forum AWT / Swing
    Replies: 2
    Last Post: 11-19-2009, 06:02 PM
  3. Passing a Vector object to a function
    By evapisces in forum New To Java
    Replies: 4
    Last Post: 09-27-2008, 03:18 AM
  4. Search a object in a vector
    By TalhaS in forum New To Java
    Replies: 2
    Last Post: 04-30-2008, 02:05 PM
  5. URGENT: Sorting a vector of object by an element
    By doobybug in forum New To Java
    Replies: 1
    Last Post: 03-12-2008, 07:37 PM

Posting Permissions

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