Java examples for Object Oriented Design:Exception
Swallowing exceptions
import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static void openFile(String name) { try {/*from ww w .j ava 2 s . co m*/ FileInputStream f = new FileInputStream(name); } catch (FileNotFoundException e) { } } }