arrays to linked lists
This seems like a Java deficiency to me. Let's say I have a standard vanilla array like:
And all I want to do is turn it into a linked list. I don't understand why the LinkedList class doesn't just have a constructor that looks like:
I mean, I can use the add method to add the array items one-by-one into the LinkedList, but I just don't see why this is necessary, from a design perspective...
int[] myNums = {1,1,2,3,5,8,13}.And all I want to do is turn it into a linked list. I don't understand why the LinkedList class doesn't just have a constructor that looks like:
LinkedList(arrayName).I mean, I can use the add method to add the array items one-by-one into the LinkedList, but I just don't see why this is necessary, from a design perspective...
