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