Steps:
Open a Scanner on the file.
Count all of the lines in the file.
Initialize the array to an array with size equal to the count of the number of lines in the file.
Close the Scanner.
Open a Scanner on the file.
From 0 to yourArray.length - 1, assign the ith index of your array to the current line in the Scanner.
Close the scanner.