// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
public class Patio14 {
    public static void test(Object o) {
        if(o instanceof String s) {
            System.out.println("String = " + s);
        } else if(o instanceof Integer i) {
            System.out.println("Integer = " + i);
        } else {
            System.out.println("Unknown class");
        }
    }
    public static void main(String[] args) {
        test("ABC");
        test(123);
    }
}
