15 lines
362 B
Java
15 lines
362 B
Java
//: exceptions/ExceptionSilencer.java
|
|
// ©2015 MindView LLC: see Copyright.txt
|
|
|
|
public class ExceptionSilencer {
|
|
public static void main(String[] args) {
|
|
try {
|
|
throw new RuntimeException();
|
|
} finally {
|
|
// Using 'return' inside the finally block
|
|
// will silence any thrown exception.
|
|
return;
|
|
}
|
|
}
|
|
} /* Output: (None) *///:~
|