I do want to copy the contents of one ArrayList, into another. I guess I didn't see what I wrote.
Type: Posts; User: AnnexTrunks
I do want to copy the contents of one ArrayList, into another. I guess I didn't see what I wrote.
Hmmm, when choosing a copyOf method, I chose the very first option...followed thru with code...and no matter what I seem to do....I get a squiggly line underneath my second parameter. Whether I...
Ok, I began typing my second array....when I reach.....""Array." once I type in the period, a small list of java methods come up. A LOT of copyOf comes up. Which one should I use?
There is too many people suggesting too many things. Sorry guys but I am more confused now then ever. :(
There is nothing wrong with that statement. It works fine with the while loop, and for loop. It's not until after all that, when I began coding my copying thingy, I start getting errors.
If you scroll up in my original post, you will see an Array declared, and PhoneBookEntry is the other class file I am referencing to. That file in itself is complete and functional. So is the...
Why is this line giving me troubles? The red squiggly line is below the "copyOf". Netbeans says it does not seem to be recognized. I am having so much trouble with this lol. Java is hard.
...
In my second for loop, the .size, and .get give me red squiggly lines. I just copied from my first for loop, but I substituted the array names. I then tried copying your provided code into mine to...
I've been tinkering with my code some more, and here is what I got.
import java.lang.reflect.Array;
import java.util.ArrayList;
import javax.swing.JOptionPane;
/* Exam Practice # 2
* This...
Hmmm, I understand that more lol. I am only two months in, but I get what your telling me. I tried implementing that into my code and following it through with a loop. I will copy my code below.
...
I am working with arrays and I am trying to figure out how to copy an array, using this website as help.http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html#copyOf%28int[],%20int%29
...