Read the contents of a file into an array in Java using Scanner and a Try with Resources block
Code available: https://github.com/chenrichsen/ReadFi...
Table of Contents:
00:22 - Project Overview
00:58 - Controller
01:51 - The data file
02:47 - IOController
03:16 - Required imports
03:37 - Method signature
05:02 - Declare and initialze return value
05:26 - Try with resources
07:24 - Use the IOController
08:13 - Add a for loop to display contents
10:14 - Catch the exception