cant compilethe code as get uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.

I have two text files I read from and store in a arraylist.

I then read through this arraylist. These arraylist are two dimensional and then perform calculationsand create a new file or display this new string on screen.

I am kind of confused how to access these two dimensional array. I tried to compile the program and get a comiplation erroe. Could someone please help me. What am I doing wrong.

Who is Participating?
CEHJConnect With a Mentor Commented:
I very much doubt the error you report is nothing to do with the code you attached
Telling us what the Error* actually is would be quite helpful, although as you now know from your other question, this is not an Error but a Warning.

*The 'error' being at compile time.
A cursory shuftee at your code suggests to me that you would need to drill into the nested ArrayList to obtain what you need from the List. Such as perhaps on the lines of

for( int  month = 1; month <= 1; month++)
                int rainint = (eMap.get( month-1).get(month-1)).intValue(); // my new var, obtaining the Integer as an int
                Double rainDouble = (Double)Integer.valueOf(rainint).doubleValue(); // make a discrete Double from that int
                rain = randomizeRain( rainDouble); // now run your method

Open in new window

But I could be wrong.

* eMap.get( month-1).get(month-1)   - obviously this second index would need to receive iterations depending on its count of elements.
I very much doubt the error you report is nothing to do with the code you attached
should have been
I very much doubt the error you report is anything to do with the code you attached (at least in its present form)
SMadhaviAuthor Commented:
I will break this down in another question and I think the problem is thAat The eMap listarray is not getting populated from the tab limited text file.
Will post it as another question
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.