Halt and catch fire: Difference between revisions
New post.
(Added a shorter solution.) |
(New post.) |
||
Line 288:
It's probably more effective to use <syntaxhighlight lang="j"> exit 0</syntaxhighlight> -- this approach would eliminate dependence on a variety of implementation details.
=={{header|Java}}==
<syntaxhighlight lang="java">
public final class HaltAndCatchFire {
public static void main(String[] aArgs) {
// Any one of the lines below, when uncommented, will cause a program halt.
// throw new AssertionError("Stop now!");
// System.out.println(0/0);
// Runtime.getRuntime().exit(1);
}
}
</syntaxhighlight>
=={{header|jq}}==
|