diff --git a/javaguide.html b/javaguide.html index 789bdf446..59f03dc54 100644 --- a/javaguide.html +++ b/javaguide.html @@ -662,7 +662,8 @@
Terminology Note: Inside the braces of a
switch block are one or more statement groups. Each statement group consists of
one or more switch labels (either case FOO:
or
-default:
), followed by one or more statements.
default:
), followed by one or more statements (or, for
+the last statement group, zero or more statements).
default
case is presen
Each switch statement includes a default
statement
group, even if it contains no code.
Exception: A switch statement for an enum
type may omit
+the default
statement group, if it includes
+explicit cases covering all possible values of that type. This enables IDEs or other static
+analysis tools to issue a warning if any cases were missed.
+
+
Tip: Don't do it. If you absolutely must, first read and understand - Effective Java + Effective Java Item 7, -Item 7, "Avoid Finalizers," very carefully, and then don't do it.
+"Avoid Finalizers," very carefully, and then don't do it. @@ -1081,22 +1089,24 @@/** An especially short bit of Javadoc. */-
The basic form is always acceptable. The single-line form may be substituted when there are no -at-clauses present, and the entirety of the Javadoc block (including comment markers) can fit on a -single line.
+The basic form is always acceptable. The single-line form may be substituted when the entirety
+of the Javadoc block (including comment markers) can fit on a single line. Note that this only
+applies when there are no block tags such as @return
.
-
One blank line—that is, a line containing only the aligned leading asterisk
-(*
)—appears between paragraphs, and before the group of "at-clauses" if
+(*
)—appears between paragraphs, and before the group of block tags if
present. Each paragraph but the first has <p>
immediately before the first word,
with no space after.
Any of the standard "at-clauses" that are used appear in the order @param
,
+
Any of the standard "block tags" that are used appear in the order @param
,
@return
, @throws
, @deprecated
, and these four types never
-appear with an empty description. When an at-clause doesn't fit on a single line, continuation lines
+appear with an empty description. When a block tag doesn't fit on a single line, continuation lines
are indented four (or more) spaces from the position of the @
.