I have Java code that asks for user input and then stores this data in a string variable. The below function is part of a class called \'number\' and is called in the main funct
You have closed the scanner inout stream readIn.close(); twice.
You are closing the stream before picking line by line from the file. So you have to close it once after all the instances that use readIn is finished.