By the way, I finally got the singleton solution working. Thanks Cornix!
//singleton class for holding global variables
class Globals {
// setup singleton instance
private static Globals...
Type: Posts; User: Baldyr
By the way, I finally got the singleton solution working. Thanks Cornix!
//singleton class for holding global variables
class Globals {
// setup singleton instance
private static Globals...
Well, I really can't see the difference between your singleton class and mine. :-? Except that mine is defining variables inside the constructor, whereas yours only assigns the values once the...
That is probably what I've already done as far as the architecture goes, since I've set up a Globals class, a Enums class, a Debug class, a UserInterface class and a Test class. I actually managed...
Yeah, I kinda realize this at some level. This style of coding is probably how I would have implemented this in (a language like) Python. I'll give the singleton route a try, as I've been observing...
For anyone who might be interested to see the end result
abstract class Globals {
//private class variables - default values
private static int[] attributesPrelim = {0, 0, 0, 0};
private...
I was actually gonna test whether or not totalAttributes would get assigned a default value of zero or not, but thanks for the info. Invaluable advice, all around! ^:)^
Thanks!
So I should create like a main method which initializes the variables, then?
I'm not entirely sure how to copy text from Command Prompt, but the arrow points to the letter f in for. Like:
for( int value : attributesFinal ) {
^
The second line is resulting in a Illegal start of type error.
int totalAttributes;
for( int value : attributesFinal ) {
totalAttributes =+ value;
}
I'm pretty sure that there are no...