Bug 46502 - Redundant array brakets[] are legal?
Summary: Redundant array brakets[] are legal?
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.0 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-12 13:24 EST by Randy Hudson CLA
Modified: 2003-11-12 17:27 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Hudson CLA 2003-11-12 13:24:17 EST
I can type:
     int[] x[];
OR
     void foo(int[] bar[]) {}

Is this redundancy allowed by the spec? I wouldn't be surprised.
Comment 1 Olivier Thomann CLA 2003-11-12 17:26:26 EST
Yes, this is perfectly legal. This is not redundant. If you write:
int[] x[], x is an array of ints with a dimension 2.

See http://java.sun.com/docs/books/jls/second_edition/html/arrays.doc.html#17235
Ok to close?
Comment 2 Olivier Thomann CLA 2003-11-12 17:27:56 EST
I close it as invalid.
Reopen if the explanation is not enough.