File f; try { f = new File("file.txt"); // More stuff } catch (FileNotFoundException e1) { System.out.println("That file doesn't exist!"); f = new File("backupFile.txt"); } catch (SomeOtherException e2) { // Handle other exception }
File f; try { f = new File("file.txt"); // More stuff } catch (FileNotFoundException e1) { System.out.println("That file doesn't exist!"); f = new File("backupFile.txt"); } catch (SomeOtherException e2) { // Handle other exception }