Question: Oracle Academy Java Programming 3-6: Exceptions and Assertions Lesson PowerPoint - https://drive.google.com/open?id=0B3GMuhuuq6eANFl4ZEttWFFCM00 1. You would like to write a program that will open a file
Oracle Academy
Java Programming 3-6: Exceptions and Assertions
Lesson PowerPoint - https://drive.google.com/open?id=0B3GMuhuuq6eANFl4ZEttWFFCM00
1. You would like to write a program that will open a file called myFile.txt. Write a try catch statement to open the file and catch the error if the file fails to open.
2. Create an exception called myException that prints out an error message when thrown.
3. Create a block of code that utilizes all three types of invariants and asserts their values.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
