class Contracts { boolean x; public boolean testSideEffect() { return x && !(x = false); } public void testSideEffectInsideCall() { if (a()) { System.out.println(); } } private boolean a() { return x = false; } }