Swallowing exceptions - Java Object Oriented Design

Java examples for Object Oriented Design:Exception

Description

Swallowing exceptions

Demo Code

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) {
    }
  }
}

Related Tutorials