Question: /////// error: unreported exception Exception; must be caught or declared to be thrown this.obj.main(new String[0]); ^ error: unreported exception Exception; must be caught or declared
///////
error: unreported exception Exception; must be caught or declared to be thrown this.obj.main(new String[0]); ^ error: unreported exception Exception; must be caught or declared to be thrown this.obj.main(new String[0]); //dictate main flow of student program ^ 2 errors
I AM GETTING THIS ERROR PLEASE HELP
Write a program that reads in all lines from a file and saves each to an element in an array. The program should then print out the lines in reverse to a file.
1. Create a class called Lab7.
2. To break up this problem, first write code that reads in the first line of the file and prints it to the screen. Use my sample file called haikuFun.txt.
3. When you have this working, modify your code to read in every line of the file and print it to the screen. Assume the file will only ever have 6 lines. You should use breakpoint debugging to make sure each line is getting read in properly.
4. Next, modify your code to store each of the 6 lines into an array.
5. Lastly, modify your code to print the lines in reverse order to a file called reverse.txt. Your program does not need to print anything to the screen at this point.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
