Schreiben Sie eine Java-Methode, deren Kompilation genau diesen Bytecode erzeugt: a)
public static int h(int, int);
Code:
0: iconst_3
1: iload_0
2: iadd
3: iload_1
4: iconst_4
5: isub
6: imul
7: ireturn
b)
public static int g(int, int);
Code:
0: iload_0
1: istore_2
2: iload_1
3: ifle 17
6: iload_2
7: iload_0
8: imul
9: istore_2
10: iload_1
11: iconst_1
12: isub
13: istore_1
14: goto 2
17: iload_2
18: ireturn