[Bluej-discuss] Codepad Bug?
Brad Richards
ber at acm.org
Mon Oct 29 00:42:31 GMT 2007
Ben's right -- I spoke to soon in my last note. I tested it on my
Java 1.5 system without thinking. I tried it just now on the BlueJ
2.2.0/WinXP/Java 1.6 setup and it fails as described below.
Brad
At 5:04 PM -0700 10/28/07, Ben Kaplan wrote:
>It won't work.
>
>calling
>>| int[] nums = new int[]{1, 2, 3};
>
>gives the "cannot find symbol: Constructor- Integer(int[])" error.
>
>if you declare it as an Integer[]
>
>>| Integer[] nums = new Integer[]{1, 2, 3};
>
>it will work initially, but if you try to do anything with the
>array, you'll get a ClassCastException (it tries to cast the
>Integer[] as an Integer).
More information about the bluej-discuss
mailing list