public static boolean test(int arg) { TestClass object = null; if (arg == 0) { object = obj; } return object.method(); }