Ask Experts Questions for FREE Help !
Ask
    BeWahtEver's Avatar
    BeWahtEver Posts: 1, Reputation: 1
    New Member
     
    #1

    Apr 19, 2012, 04:12 PM
    convert arraylist to an array of arraylist!
    I do have an ArrayList and I want to convert it to an array of arrayList.

    I have a class X that has an ArrayList. And In the main class , I have an ArrayList that has many X objects. I want to create a new Array of ArrayList Y[ ] that has the element of the ArrayList from X in my ArrayList. How can I do this? Here is my code...
    class X {
    ArrayList<Double> data;

    X() {
    data = new ArrayList<Double>();
    }

    public class C{
    ArrayList<X> XX = new ArrayList<X>();

    ArrayList Y[]=null;
    // Now I want to convert XX to Y[ ]

    }

Check out some similar questions!

Array controller [ 1 Answers ]

Have 4 drives in array. Three show as 1 logical; one shows as unallocated. How do I extend the unallocated to the logical.

An array [ 1 Answers ]

How many ratings do you wish to enter? 10 Rating #1: 9 Rating #2: 5 Rating #3: 9 Rating #4: 2 Rating #5: 11 Invalid entry, score must be in range of 1 and 10; try again. Rating #5: -1 Invalid entry, score must be in range of 1 and 10; try again. Rating #5: 8


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.