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

Modernize examples in StringTokenizer and {Date,Number}Format

    XMLWordPrintable

Details

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

    Description

      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>

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: