In this project you will read weather data from a file and populate an Array with the file data. The data is then sorted in an Array, and output to another file.
In this project you will read weather data from a file and populate an Array with the file data. The data is then sorted in an Array, and output to another file.
Loops are used in a Java program whenever a sequence of code must be repeated. A common use for a while loop is to read data from a file, where the file is of unknown length. A for loop, on the other hand is often used when the repeat count of a code sequence is known. A common use of a for loop is to iterate through an array. An Array is a list of items of a fixed size where each entry is the same type of data. The array could contain numbers, Strings of characters, or a user-defined data type.
Note: This course works best for learners who are based in the North America region. We’re currently working on providing the same experience in other regions.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.