codegen: handle exceptions of a method
[mate.git] / tests / Instance2.java
1 package tests;
2
3 public class Instance2 extends Instance1 {
4         public int y;
5
6         public Instance2() {
7                 x = 0x66;
8                 y = 0x77;
9         }
10
11         public static void main(String []args) {
12                 int sum = 0;
13                 Instance1 a = new Instance1();
14                 Instance2 b = new Instance2();
15                 sum += a.x; // 0x55
16                 sum += b.x; // 0x66
17                 sum += b.y; // 0x77
18                 a.x = 0x11; sum += a.x; // 0x11
19                 b.x = 0x22; sum += b.x; // 0x22
20                 b.y = 0x33; sum += b.y; // 0x33
21                 Instance1.id(sum); // 0x198
22                 System.out.printf("0x%08x\n", b.getX()); // 0x22
23         }
24
25         public int getX() {
26                 return this.x;
27         }
28
29         public void setX(int a) {
30                 this.x = a;
31         }
32 }