In this video, I introduce the concept of storing information in text file format. I create some data that represents a shopping list using an ArrayList and write the data to a file called shopping.txt using the Java FileWriter and PrintWriter classes. I then write a method to read the information back from the shopping.txtRead more »

In this video, I introduce the idea of collections of objects using a dynamic data structure in Java called the ArrayList. I show how to create a standard array of String objects and how to iterate over the array to print out the array items. I then replace this standard array with an ArrayList andRead more »

In this video, we build on the code developed in the basic user input validation video (linked below) by creating a Keyboard class that provides reusable user input validation routines. This makes it very easy to add user input validation to keyboard input in any program. Check out the previous video on Basic User InputRead more »

In this video, we build upon the handling runtime errors video content by using a try and catch block to handle basic user input validation. We show how input from the keybaord through the Java Scanner class can fail if the user enters an incorrect data type and we develop a solution that uses StringRead more »

This video introduces very basic runtime error handling in Java using try and catch blocks. The video covers two example programs that cause runtime errors (divide by zero and array index out of bounds) and uses try and catch blocks to handle the errors and allow the programs to continue and exit in a normalRead more »

This video extends the text-based menu developed in part 1 of this tutorial by adding a static method to display the menu items. It also separates the menu data from the display method by create arrays that store the menu options and item names. We also add prices to our menu by including a pricesRead more »