aboutsummaryrefslogtreecommitdiffstats
path: root/admin/notes/java
diff options
context:
space:
mode:
authorPo Lu2025-03-29 22:37:39 +0800
committerPo Lu2025-03-29 22:44:59 +0800
commit04bd6497300789cd90b365299885517d92292648 (patch)
tree9f06ff43a4a6bf38ae02ca6d1dc6e2427c84d38b /admin/notes/java
parentf60fc1287d499e8c93857b1b96e8bd2467b22c8d (diff)
downloademacs-04bd6497300789cd90b365299885517d92292648.tar.gz
emacs-04bd6497300789cd90b365299885517d92292648.zip
; * admin/notes/java: Document substitutes for `goto' in Java.
Diffstat (limited to 'admin/notes/java')
-rw-r--r--admin/notes/java14
1 files changed, 14 insertions, 0 deletions
diff --git a/admin/notes/java b/admin/notes/java
index 0bfdff339cb..9a7c925e123 100644
--- a/admin/notes/java
+++ b/admin/notes/java
@@ -452,6 +452,20 @@ on systems where shared object constructors are supported.
452See http://docs.oracle.com/en/java/javase/19/docs/specs/jni/intro.html 452See http://docs.oracle.com/en/java/javase/19/docs/specs/jni/intro.html
453for more details. 453for more details.
454 454
455Java does not support `goto' statements, which it defines as reserved
456identifiers but does not assign any syntatic role. If you are in a
457position where you must exercise `goto' to exit a block prematurely, you
458may define the block and exit it with a named `break' statement, thus:
459
460 label:
461 {
462 int x, y = foo ();
463
464 if (y)
465 break label;
466 x = something ();
467 }
468
455 469
456 470
457OVERVIEW OF ANDROID 471OVERVIEW OF ANDROID