[Bluej-discuss] Codepad Bug?
Ben Kaplan
bskaplan14 at yahoo.com
Mon Oct 29 00:04:16 GMT 2007
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).
----- Original Message ----
From: Gordon Royle <gordon at csse.uwa.edu.au>
To: General discussion for users of BlueJ <bluej-discuss at bluej.org>
Sent: Sunday, October 28, 2007 7:39:36 PM
Subject: Re: [Bluej-discuss] Codepad Bug?
On 29/10/2007, at 7:31 AM, Ben Kaplan wrote:
>
> result of the change in Java versions, or a bug in the codepad? Does
> anyone have a workaround for this?
Try
int[] nums = new int[] {1,2,3};
and see if that works...
(I don't have the environments you mention so can't test it myself..)
--
Associate Professor Gordon Royle
Department of Computer Science & Software Engineering
University of Western Australia
http://people.csse.uwa.edu.au/gordon
_______________________________________________
mailing list bluej-discuss at bluej.org
To unsubscribe or change your preferences, go to
http://lists.bluej.org/mailman/listinfo/bluej-discuss
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20071028/6e135ece/attachment.html
More information about the bluej-discuss
mailing list