Bugs item #854535, was opened at 2003-12-04 21:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=854535&group_id=44253
Category: Interactions
Group: Annoying
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: new 2d array throws IllegalArgumentException
Initial Comment:
Cannot create a 2d array using new with an initializer list in
the interactions window:
> int[][] a;
> a = new int[][] { new int[] {1, 2}, new int[] {3} };
java.lang.IllegalArgumentException: array element type
mismatch
at java.lang.reflect.Array.set(Native Method)
> a = new int[][] {{1, 2}, {3}};
java.lang.IllegalArgumentException: array element type
mismatch
at java.lang.reflect.Array.set(Native Method)
No problem with 1d arrays:
> int[] b;
> b = new int[] {1, 2};
> b.length
2
> b = new int[] {3, 4, 5, 6, 7};
> b.length
5
Suzanne Menzel
me...@in...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=854535&group_id=44253
|