Learn how to use try-catch-finally blocks for exception handling.
- [Voiceover] There are two parts to handling exceptions:…planning for exceptions in code…that other people have written,…and throwing exceptions in code that you write.…Handling exception code that other people have written…does not imply that you think…other people's code contains errors,…it implies that you realize that you might cause errors…while using other people's code.…The class SillyDivision shows an example of error handling.…Error handling or exception handling…usually involves three blocks, try, catch, and finally.…
You may not use the finally block too often,…but in situations where you use an expensive resource…such as a file handle or a database connection,…you'll have a finally block.…However, in many, many situations,…you will have try blocks and catch blocks.…If we examine this class in detail,…we'll see that we have a constructor.…It has two parameters, a numerator and a denominator.…It calls the method sillySubstitution.…sillySubstitution sets every denominator to zero.…
Therefore when the method calculateQuotient is called,…
- The IMQAV model
- Downloading software
- Installing and setting up a Java coding environment
- Mock tests
- Code coverage
- Using windows, views, and modes in IntelliJ IDEA
- Creating classes and attributes
- Creating constructors
- Casting variables
- Matching literals with regular expressions
- Regular expressions
- Design patterns
Skill Level Intermediate
Java: Database Integration with JDBCwith David Gassner2h 51m Intermediate
NumPy Data Science Essential Trainingwith Charles Kelly3h 54m Intermediate
1. Getting Started with Java
2. Test-Driven Development
3. IntelliJ IDEA
4. Object-Oriented Java
6. Regular Expressions (Regex)
8. Design Patterns
9. Applying Data Science
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.