I am creating some doubly linked list of type Double and no matter how I declare another linked list of the same type, it always refers to the first list.
Such as:
LinkedList<LinkedList<Double>> trainingData = new LinkedList<LinkedList<Double>>();
LinkedList<LinkedList<Double>> newData = new LinkedList<LinkedList<Double>>();
Add some things to trainingData...
newData = trainingData;
Then whatever changes I make to trainingData after this assignment gets changed in newData. I've also tried passing trainingData in the constructor of newData and using a nested loop to assign trainingData's data to newData, but it is still giving me the same results where newData references trainingData.