class X { void expressions(Object obj) { if (obj instanceof String s) { } if (obj instanceof Integer integer) { System.out.println(integer); } } }