r/javahelp • u/[deleted] • Nov 06 '19
Going crazy, need help with a program
Hi guys, I'm an ansipring java developer. My developer friend gave me an exercise and I can't for the life of me figure out how to do it. If you guys could help I would be so grateful.
This is the exercise:
Given a weather.dat file, write a program that given the file in input returns the day with the biggest and lowest temperature range. In this file there are 30 days and there's a lot of data for these days, but the temperature columns are the second and third one. So it's like : Day | Max Temp | Lowest Temp| ecc | ecc | ...
I understood I have to use Java Arrays and I managed to have the program read all the file but I don't know how to proceed. Help, thanks lol
16
Upvotes
5
u/mikelak Nov 06 '19
where exactly are you stuck?
did you read all the file as one string or one line after the other?
did you manage to fill the arraylist?
and how did you approach getting the range? two lists or 1?