Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-283

Using .length on arrays fails in the codepad

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Component/s: CodePad

      Description

      In the code pad, this code

      new String[6].length
      

      and this code:

      String[] x = new String[6];
      x.length
      

      used to work in BlueJ 2.5.3 and returned 6 in each case (note there is no trailing semi-colon on either last line). However, in BlueJ 3.0.1 (and 3.0.2rc1) we get:

      Error: not a statement

      for the first, and:

      Error: ';' expected

      for the second.

        Attachments

          Activity

            People

            • Assignee:
              davmac Davin McCall
              Reporter:
              nccb Neil Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: