This course covers how to persist data as well as how to write data from programs to file to be used later, which is called file output. We'll also learn about how to load the data from files and populate our variables with that data, which is called file input.
Intended Audience
- Beginner coders or anyone new to Java
- Experienced Java programmers who want to maintain their Java knowledge
- Developers looking to upskill for a project or career change
- College students and anyone else studying Java
Prerequisites
This is a beginner-level course and can be taken by anyone with an interest in learning about Java.
In this section, we've learned about how to make data persistent by using file input and file output collectively known as file I/O. We've studied how to read data from a file on a secondary storage device into main memory where we can use the data in the form of variables. We've also learned how to do the opposite, by taking data from main memory and writing the data to files on a secondary storage device. Because main memory is volatile, that is when it loses power of the data and instructions in it are lost, having a way to remember the data long-term enables us to make programs that can make use of data for much longer periods of time and in between launches of these programs.
We've used our newfound knowledge and combined it with previous knowledge about classes and objects to retrieve data from and write data to files about objects we are storing in memories such as our end of section projects, where we worked with rectangles and circles. In addition, we also learned the basics of exceptions and exception handling in this section. Throughout the course, we've established a fantastic foundation in Java to learn more complex concepts. We will use a lot of what we've learned thus far in the course in the next section, where we expand our discussion on classes and objects by learning about inheritance, polymorphism, and other related topics. I'll see you there.
John has a Ph.D. in Computer Science and is a professional software engineer and consultant, as well as a computer science university professor and department chair.