I am trying to learn programming on my own time and I am still trying to get the hang of it. I am getting the following error:
java.io.IOException: The h
Well you're closing input
in the finally
block of the constructor, before you actually start using it. Move the closing part out of the constructor to somewhere it will be called when you're done, such as below the call to arrayListWithNumbers
or a separate close method that you call from you main.
I think you are confusing finally
with finalize()
which you should not use for this purpose either.