Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    Hi, I'm learning java and can't understand how to properly use arrays and methods. Been studying for a couple of months and I DO understand the theory of it, but can someone give me good examples who would help to understand better Arrays and Methods? Just a good explanation, real examples.
    Offline

    3
    ReputationRep:
    I think the best way to understand it would be to understand how it works down to the metal. I would preface this by saying that there are various implementations for methods and array.

    For methods: The name of a method is usually just a variable, just like any other. It is specifically a pointer variable that points to a certain point in memory which has instructions on what to do. Whenever a method is called, the VM just continue execution at the position in memory which the method points to and sets all the method argument variables at the area in memory to be the value specified by the user.
    Offline

    18
    ReputationRep:
    For a beginners introduction for learning the whole concept behind objects/arrays this book is exceptionally well written
    http://www.bluej.org/objects-first/ .

    Books are pricey, however before last year when I started on Scratch I had never programmed before, now I can create minor programs in Java with ease after reading it (the CORRECT way, utilising a good Class structure, which if you want to become employable in the future is VERY important, don't underestimate the importance of this!).
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    What newspaper do you read/prefer?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.