August 2004
Intermediate to advanced
480 pages
9h 41m
English
Let's look at a short demo class that allows us to see everything in one place. This example shows different ways of working with code that could generate exceptions. You might not be familiar with working with Java's networking libraries or database libraries. It doesn't matter here. What matters is noticing the different ways that exceptions can be used in your code.
package net.javagarage.demo.exceptions; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.sql.*; /** * This class demonstrates different ways to write * your methods when you need to deal with exceptions * in them. Any one of them could be most appropriate, * depending ...
Read now
Unlock full access