Still the same, but now with a StringBuilder instead of the code variable.
That StringBuilder does not need to be a static variable, just make it local within the generateCode method.
Type: Posts; User: Cornix
Still the same, but now with a StringBuilder instead of the code variable.
That StringBuilder does not need to be a static variable, just make it local within the generateCode method.
Nope.
You have a method called "generateCode", this method is returning a String. The returned String is being used by your main method.
Now, this String just happened to be the same String that...
I have some general tips for you:
1) If you want to define constant values (like in C or C++) you dont use "static" but instead "static final" for variables.
A static variable is not constant, its...
Can you define "efficient"? Then maybe we could answer your question.