Well during your while loop you really aren't storing any data at all. You create the 2D String array afterwards, but all of it's contents are null. You never actually get any data from the input file