26 lines
502 B
Java
26 lines
502 B
Java
/* (c) 2022 Thomas Smits */
|
|
package pr2.ausnahmen.eigene;
|
|
|
|
import java.io.IOException;
|
|
|
|
public class SimpleExamples {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
boolean b = true;
|
|
|
|
try {
|
|
System.out.println("A");
|
|
|
|
if (b) {
|
|
throw new IOException("Festplatte abgebrannt");
|
|
}
|
|
|
|
System.out.println("B");
|
|
}
|
|
catch (IOException e) {
|
|
System.out.println("Fehler: " + e.getMessage());
|
|
}
|
|
}
|
|
}
|