User Profile
Collapse
-
No. I'm just a student and I use BlueJ as my compiler. Why do you ask though?... -
Thanks for the tip Ganon. I added an "ind--" into all 3 of the if statements and did the trick.
Now lets say that I want to make the program duplicate all values that are even.
Ex.
arraylist = [ 24, 25, 44, 22, 12 ]
would be turned into
arraylist = [ 24, 24, 25, 44, 44, 22, 22, 12, 12 ]
...Code:for (int ind = 0; ind<nbrs.size(); ind++) {Leave a comment:
-
Trouble with arraylists
Hi, Everyone, recently my programming class has started making programs involving arraylists. Our program is supposed to delete all numbers in the arraylist that contain numbers that end in the number we input and also numbers that are either +1 or -1 from the number.
Ex.
arrayList = [43, 59, 87, 60, 67, 25]
What number do you wish to input?
8
arrayList = [43, 60, 25]
^ This is the output...
No activity results to display
Show More
Leave a comment: