19 lines
378 B
Plaintext
19 lines
378 B
Plaintext
public class Dividieren {
|
|
public static void main(String args[]) {
|
|
int a = 7;
|
|
int b = 7.9;
|
|
try {
|
|
System.out.println("a : b = " + a/b);
|
|
} catch(ArithmeticException e) {
|
|
System.out.println("Bei der Berechnung gab es Problem");
|
|
System.out.println("Problem: "+ e.getMessage());
|
|
} catch (Exception e) {
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|