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.
Turn on thread page Beta
[JAVA Help] Methods,Arrays watch
- Thread Starter
- 22-01-2017 11:50
- 22-01-2017 16:09
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.
- 23-01-2017 07:43
For a beginners introduction for learning the whole concept behind objects/arrays this book is exceptionally well written
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!).