class Test { void test(Object obj) { if (Math.random() > 0.5 || (obj instanceof String s && s.isEmpty())) { System.out.println(); } } }