Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Thread: Array of object

    by Norm
    Replies
    9
    Views
    1,090

    Re: Array of object

    yes. The contents of an object are not considered when counting the number of objects.
  2. Thread: Array of object

    by Norm
    Replies
    9
    Views
    1,090

    Re: Array of object

    All arrays have a .length whose value is determined by the number of slots in the array.


    Add a println to print it out to see what its value is.
  3. Thread: Array of object

    by Norm
    Replies
    9
    Views
    1,090

    Re: Array of object

    Yes.
    Look at the loop where the output is generated. See that it uses the .length attribute to control how many times to loop.
  4. Thread: Array of object

    by Norm
    Replies
    9
    Views
    1,090

    Re: Array of object

    If the program is calculating the two items, then the code must be called two times. Is there a loop that goes through an array?

    Try debugging the code by adding some println statements that...
  5. Thread: Array of object

    by Norm
    Replies
    9
    Views
    1,090

    Re: Array of object

    What does the program's comments and doc say about how it uses the contents of the array?
    Does it say what elements are in the slots of the array? What is in the second element?



    Just like...
Results 1 to 5 of 5