Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.22 seconds.

  1. Re: Overriding Superclass Static Methods, Using the Superclass Method

    That is what is called an anti-pattern, and it's generally not recommended (even though Java itself does it in a few cases). I've recommended my approach above, but really, do whatever fits into your...
  2. Re: Overriding Superclass Static Methods, Using the Superclass Method

    It's a good situation to avoid, and I really think it's a symptom of not using static values how they should be used.



    No, that's the thing- static members can't be overridden. What I'm talking...
  3. Re: Overriding Superclass Static Methods, Using the Superclass Method

    That seems like a strange setup. If you really want them to be static and independent, then each Tower subclass is going to have to have its own set of static base variables. That seems messy to me....
  4. Re: Overriding Superclass Static Methods, Using the Superclass Method

    Here's a question: Why are those methods static in the first place?
  5. Re: Overriding Superclass Static Methods, Using the Superclass Method

    You can't override a static method. You can only hide it.



    Bingo bango. More generally, you should only refer to a static method using its class, not a reference.

    Recommended reading:...
Results 1 to 5 of 5