diff --git a/src/share/classes/java/lang/AbstractStringBuilder.java b/src/share/classes/java/lang/AbstractStringBuilder.java index fc513f55efe961811fabcccd4f9de270beb0184f..03999c445a55d0810a50e57ab9d460e03c9effe2 100644 --- a/src/share/classes/java/lang/AbstractStringBuilder.java +++ b/src/share/classes/java/lang/AbstractStringBuilder.java @@ -860,9 +860,9 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { * @return the specified subsequence. * * @throws IndexOutOfBoundsException - * if start or end are negative, - * if end is greater than length(), - * or if start is greater than end + * if {@code start} or {@code end} are negative, + * if {@code end} is greater than {@code length()}, + * or if {@code start} is greater than {@code end} * @spec JSR-51 */ @Override @@ -1292,7 +1292,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence { /** * Returns the index within this string of the first occurrence of the * specified substring, starting at the specified index. The integer - * returned is the smallest value k for which: + * returned is the smallest value {@code k} for which: *
      *     k >= Math.min(fromIndex, str.length()) &&
      *                   this.toString().startsWith(str, k)
@@ -1418,7 +1418,7 @@ abstract class AbstractStringBuilder implements Appendable, CharSequence {
     public abstract String toString();
 
     /**
-     * Needed by String for the contentEquals method.
+     * Needed by {@code String} for the contentEquals method.
      */
     final char[] getValue() {
         return value;
diff --git a/src/share/classes/java/lang/String.java b/src/share/classes/java/lang/String.java
index d73a2f7c2e9c8d4f53ad26c5a8041971ef460685..a9bc2f376481be95a1b6777f29c783b6f6c23b56 100644
--- a/src/share/classes/java/lang/String.java
+++ b/src/share/classes/java/lang/String.java
@@ -615,10 +615,10 @@ public final class String
     }
 
     /**
-     * Returns true if, and only if, {@link #length()} is 0.
+     * Returns {@code true} if, and only if, {@link #length()} is {@code 0}.
      *
-     * @return true if {@link #length()} is 0, otherwise
-     * false
+     * @return {@code true} if {@link #length()} is {@code 0}, otherwise
+     * {@code false}
      *
      * @since 1.6
      */
@@ -1229,23 +1229,23 @@ public final class String
     /**
      * Tests if two string regions are equal.
      * 

- * A substring of this String object is compared to a substring + * A substring of this {@code String} object is compared to a substring * of the argument other. The result is true if these substrings * represent identical character sequences. The substring of this - * String object to be compared begins at index toffset - * and has length len. The substring of other to be compared - * begins at index ooffset and has length len. The - * result is false if and only if at least one of the following + * {@code String} object to be compared begins at index {@code toffset} + * and has length {@code len}. The substring of other to be compared + * begins at index {@code ooffset} and has length {@code len}. The + * result is {@code false} if and only if at least one of the following * is true: - *