Static variable tips

Make constants, like PI, static and public If static variables are not constants, keep them private if possible Static variables save space and are easy to use as they keep…

Continue Reading Static variable tips

Variable Scope Part 2

There are 3 main types of variables: Local Parameter Instance The scope of a variable is the part of the program where the variable can be accessed. It's good programming…

Continue Reading Variable Scope Part 2

Variable Scope

LOCAL VARIABLES & PARAMETER VARIABLES A local variable is a variable declared in the body of a method. A parameter variable(s) is/are declared in the method headers e.g. when the…

Continue Reading Variable Scope