Results 1 to 13 of 13
Thread: Array Lists help!!
- 01-03-2011, 07:39 PM #1
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
Array Lists help!!
Hello everybody!
I am new to java and i have a problem. I need to create an arraylist from the coordinates οφ the real and estimated values that I have read from a file.But i can't seem to do that! Can you help me please??
I woul really appreciate your help cause i m lost!!!Last edited by lilika; 01-06-2011 at 06:50 AM.
- 01-03-2011, 07:47 PM #2
What happens differently from what you were expecting? Do you get an Exception? Strange results?
Step through your program with a debugger to see where the program behavior differs from what you'd expect.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-03-2011, 07:55 PM #3
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
I cant make the array list. My result from reading the file are ok..But i can't create an array list with the integers from my file. There are no strange results...but i can't go any further for the time...
Could someone tell me how (and where) to put the code for the array list?
Thank you for your answer!
- 01-03-2011, 08:14 PM #4
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
I have not seen any point on which the arrayLisdt is filled. e.g; using myArrayList.add(myData)
- 01-03-2011, 08:19 PM #5
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
- 01-03-2011, 08:57 PM #6
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
as far I comprise
il put the add in the while loop after each time you get the X Y,.. and the you add it in the list
No problemen with the ArrayList for a int as you write Integer
- 01-03-2011, 09:03 PM #7
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
- 01-03-2011, 09:36 PM #8
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
Cross posted at the Java Programming Forums
- 01-03-2011, 09:38 PM #9
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
Is that a problem? I didn't know that.
- 01-03-2011, 09:42 PM #10
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,619
- Rep Power
- 5
The same conversation and information provided might be going on in both locations. Providing a link between cross-posts makes contributors aware of this, and not spend their time rehashing an issue that has been addressed/answered/etc... elsewhere. See Be Forthright when Cross Posting
- 01-03-2011, 09:49 PM #11
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
- 01-04-2011, 08:23 AM #12
Member
- Join Date
- Dec 2010
- Posts
- 5
- Rep Power
- 0
either you have a class to gather your 4 integer and you will push (add) the class in the list. In this case you have to change the prototype of the ArrayList
or you can add 4 time the integers in a dedicated order to get it in the same order.
- 01-04-2011, 02:05 PM #13
Member
- Join Date
- Jan 2011
- Posts
- 7
- Rep Power
- 0
Thank you so much. I managed to do that. Now that I made the array list, i have to loop throught it in order to calculate some averages. But i don't want the average of all the array list but from some specific numbers( which are in specific places)
ex. A B C D E F G H I J K L ....
I need the average of C+G+K+....+/ how many are they.
Similar Threads
-
Array Lists and Club class
By amekjian in forum New To JavaReplies: 13Last Post: 11-03-2010, 12:42 AM -
Help with lists
By datreta in forum New To JavaReplies: 6Last Post: 10-29-2010, 11:33 AM -
Help with arrays and array lists
By ambernicole88 in forum New To JavaReplies: 3Last Post: 12-04-2009, 09:47 PM -
null point exception in array lists
By c_walker in forum New To JavaReplies: 3Last Post: 10-17-2009, 05:38 AM -
please i need the code of comparing these two array lists.
By raj reddy in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 04-18-2008, 07:42 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks