Relates :
|
|
Relates :
|
|
Relates :
|
Consider code like: --- public class Test { public static void main(String... args) { new Test().test("a"); } private void test(String s) { if (s != null) { switch (s) { case "a": System.out.println("a"); //breakpoint here, and continue with step-over break; default: System.out.println("default"); //the program counter will be shown here eventually } } else { System.out.println("null"); } } } --- Place a breakpoint at the marked line, and continue with step-over. After a few steps, the current program counter marker will be at the line: System.out.println("default"); The line will not be executed, but it will appear as if it would in the debugger.
|