Solved [Static methods] I heard bad comments about them...

Discussion in 'Plugin Development' started by Quaro, May 3, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Quaro

    I heard bad comments about static methods, so is it good or bad? What is the reason, that you shouldn't use it? Examples? Or maybe its everything fine with this method type and it was lie? Thanks.
     
  2. Offline

    Superckl1

    There have been several articles and posts about this issue. A good one I found is this one:

    http://stackoverflow.com/questions/7026507/why-are-static-variables-considered-evil

    Generally, I try to limit my use of the static keyword as much as possible for reasons on the above page.
     
  3. Offline

    RawCode

    Learn java before trying to evaluate random comments about it.

    static methods are perfectly fine and perfectly safe, but only if you know how to handle them, just like everything else.
     
    Rocoty likes this.
  4. Offline

    Rocoty

    There is nothing evil about static. It is neither good or bad. It has its uses and you have to know where and when to use it.
     
Thread Status:
Not open for further replies.

Share This Page