package Examples; public class SimpleThrow { public void methodWithThrow(int x) { if (x == 0) throw new Error(); if (x == 2) throw new RuntimeException(); } public void methodWithThrowAndCatch(int x) { try { if (x == 0) throw new Error(); if (x == 2) throw new RuntimeException(); } catch (RuntimeException e) { if (x > 0) x++; } } public void methodWithAssert(int x) { // Always one unfeasible path here cause assertions are either on or off if (x > 0) assert x == 2; } }