Search:

Type: Posts; User: newbie

Search: Search took 0.07 seconds.

  1. Replies
    14
    Views
    4,083

    Re: I am having a hard time with my code

    Haha! :D
  2. Replies
    14
    Views
    4,083

    Re: I am having a hard time with my code

    An ArrayList which contains values: 2, 4, 6, 8 has a size of 4.
    get(int) method returns the value @ the specified index.

    ArrayList indices start from 0.
    In this case, all the indices will range...
  3. Replies
    14
    Views
    4,083

    Re: I am having a hard time with my code

    Try thinking -.-



    Now, with what I also said in mind, what index would your value '33' correspond to?
  4. Replies
    14
    Views
    4,083

    Re: I am having a hard time with my code

    .get(int) refers to the Arraylist index, not the value of the ArrayList object.

    Note:
    ArrayList indices start off from 0, just like arrays.

    Edit: Too slow :D
Results 1 to 4 of 4