Search:

Type: Posts; User: Cornix

Search: Search took 0.09 seconds.

  1. Replies
    11
    Views
    1,131

    Re: Have I done this efficiently ?

    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.
  2. Replies
    11
    Views
    1,131

    Re: Have I done this efficiently ?

    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...
  3. Replies
    11
    Views
    1,131

    Re: Have I done this efficiently ?

    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...
  4. Replies
    11
    Views
    1,131

    Re: Have I done this efficiently ?

    Can you define "efficient"? Then maybe we could answer your question.
Results 1 to 4 of 4