Skip to main content
deleted 1 character in body
Source Link
Mast
  • 13.8k
  • 12
  • 57
  • 127

Your approach to define the variables areis fine since you are trying to close using those variables in the finally block.

But throwing the FileNotFoundExceptionFileNotFoundException in the writeToLinewriteToLine is actually not required as there are no file related operations other than the write. This exception is likely to be thrown when the file is opened while initializing the goThroughgoThrough variable.

Your approach to define the variables are fine since you are trying to close using those variables in the finally block.

But throwing the FileNotFoundException in the writeToLine is actually not required as there are no file related operations other than the write. This exception is likely to be thrown when the file is opened while initializing the goThrough variable.

Your approach to define the variables is fine since you are trying to close using those variables in the finally block.

But throwing the FileNotFoundException in the writeToLine is actually not required as there are no file related operations other than the write. This exception is likely to be thrown when the file is opened while initializing the goThrough variable.

Source Link

Your approach to define the variables are fine since you are trying to close using those variables in the finally block.

But throwing the FileNotFoundException in the writeToLine is actually not required as there are no file related operations other than the write. This exception is likely to be thrown when the file is opened while initializing the goThrough variable.