invokevirtual: get the actual class at run-time
[mate.git] / tests / Instance4.java
1 package tests;
2
3 public class Instance4 extends Instance2 {
4         public Instance4() {
5                 x = 0x11;
6                 y = 0x22;
7         }
8
9         public static void main(String []args) {
10                 Instance2 a = new Instance4();
11                 a.getX(); // 0x1337
12                 Instance4 b = (Instance4) a;
13                 b.getX(); // 0x1337;
14         }
15
16         public int getX() {
17                 return 0x1337;
18         }
19 }