Question: Problem 3 Create a new void method called readTextFiles, to read the content of the fortunes . txt . You can use any stream
Problem
Create a new void method called "readTextFiles", to read the content of the "fortunes txt You can use any stream or reader class to complete this task.
NOTE: Anything declared in a block is local to the bloc So don't declare something in try block if you want to use it outside the block. See Savitch, p
Problem Optional
With your neighbors write a method based on the following instruction, which writes out the Phrase "Toy boat" times.
a In your program implement a for loop that calls printWriter.print Ln "Toyboat" times.
b However, before you complete section a copy and paste the following code in your IDE. Call it from main did you get an error? If yes, why? Place your answer as comments in your code.
c What import statement do you need?
I am working with java, usung try and catch i dont know how to convert a txt file into reader in java
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
