Search:

Type: Posts; User: Faz

Search: Search took 0.07 seconds.

  1. Replies
    36
    Views
    5,772

    [SOLVED] Re: Array related assignment

    Drop the int from the println statement like so


    System.out.println(grd[0]);


    EDIT:
    And the line before that you only need to declare the type of the array once.
  2. Replies
    36
    Views
    5,772

    [SOLVED] Re: Array related assignment

    Well looking at your original post you say:



    So from my understanding you just need a 2D array of two "columns" so it would look something like this

    1 65
    2 50
    3 80
    4 55
  3. Replies
    36
    Views
    5,772

    [SOLVED] Re: Array related assignment

    It comes up as 0 because you haven't declared it yet. It came up with an error because you were trying to show a value that hadn't been initialised yet(only the first element has been initialised...
  4. Replies
    36
    Views
    5,772

    [SOLVED] Re: Array related assignment

    Norm are you sure about the way you initialise an array I haven't worked with them for a while and never have extensively but I was under the impression they could be initialised this way:


    ...
Results 1 to 4 of 4