blob: 7c4ce5936115da50cde5728c60039454cd1fadd4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* RTErrorProg2.java */
public class RTErrorProg2
{
public static void main(String[] args)
{
int i, base = 0;
try {
for (base = 10; base >= 2; --base) {
i = Integer.parseInt("40",base);
System.out.println("40 base "+base+" = "+i);
}
} catch (NumberFormatException e) {
System.out.println("***Fehler aufgetreten***");
System.out.println("Ursache: "+e.getMessage());
e.printStackTrace();
}
}
}
|