Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8316187

Modernize examples in StringTokenizer and {Date,Number}Format

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 22
    • 22
    • core-libs
    • b16

      This could use the enhanced for-statement introduced in JDK 1.5:

       * The following example illustrates how the {@code String.split}
       * method can be used to break up a string into its basic tokens:
       * <blockquote><pre>
       * String[] result = "this is a test".split("\\s");
       * for (int x=0; x&lt;result.length; x++)
       * System.out.println(result[x]);
       * </pre></blockquote>

            prappo Pavel Rappo
            prappo Pavel Rappo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: