Hi,

Try this,

int[][][] num = {  *{* { 1000, 1001, 1002},
                          { 1003, 1004, 1005},
                          { 1006, 1007, 1008}  *}*
                      };
Add two more braces (indicated in blue).

Hope this helps you.
On Wed, Jul 29, 2009 at 4:06 AM, tinyang <[email protected]> wrote:

>  Here is my result for exercise 2.
>
> int[][][] num = {{ 1000, 1001, 1002},
>                          { 1003, 1004, 1005},
>                          { 1006, 1007, 1008}
>                          };
>
> The error I get is:
>
> Exception in thread "main" java.lang.RuntimeException: Uncompilable source
> code - incompatible types
>   required: int[]
>   found:    int
>         at Java3DimArray.main(Java3DimArray.java:21)
>
> I did Google for examples of initializing 3d arrays, but when I look at the
> example code, I can't figure out what is different about my code.  Can
> anyone see what I'm doing wrong?  Thanks!
>
> --
> J
> P Please don't print this e-mail unless you really need to.
>
> **
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to