how to read data from file into array in Java?

前端 未结 1 1486
情话喂你
情话喂你 2020-12-07 06:31

I need some help reading data from a text file into my ArrayList. The first part with the creating and putting the ArrayList into the text file wor

相关标签:
1条回答
  • 2020-12-07 06:50

    they keep telling me "theword cannot be resolved" whenever I try to run this

    This means that theword is not declared in the scope. You cannot access it to invoke any methods. They have it right. You need to declare theword in a broader scope, or to move the code which depends on theword into the scope where it is been declared. Maybe you've declared it inside an if or while block or so and you're trying to use it outside the block where it is been declared. That ain't going to work.

    A more detailed answer may be given whenever you clean up the code so that it's better readable.

    0 讨论(0)
提交回复
热议问题