interface I { Object CONST = new Object(); } class C { void foo(Object o) { if (o == I.CONST) return; if (o != I.CONST) return; } }