codegen: handle exceptions of a method
[mate.git] / tests / InstanceOf1.java
1 package tests;
2
3 public class InstanceOf1 {
4         public static void main(String []args) {
5                 Instance1 x = new Instance1();
6                 if (x instanceof Instance1) {
7                         System.out.printf("x is instance of Instance1 :-)\n");
8                 } else {
9                         System.out.printf("x is *not* instance of Instance1 :-(\n");
10                 }
11                 if (x instanceof Instance2) {
12                         System.out.printf("x is instance of Instance2 :-)\n");
13                 } else {
14                         System.out.printf("x is *not* instance of Instance2 :-(\n");
15                 }
16         }
17 }