Top "Static-methods" questions

Methods that neither require an instance of the class nor can they implicitly access the data (or this, self, Me, etc.

In Java, is there any disadvantage to static methods on a class?

Lets assume that a rule (or rule of thumb, anyway), has been imposed in my coding environment that any method …

java runtime static-methods
Why doesn't the compiler complain when I try to override a static method?

I know that we cannot override static methods in Java, but can someone explain the following code? class A { public …

java static-methods overriding
Is using a lot of static methods a bad thing?

I tend to declare as static all the methods in a class when that class doesn't require to keep track …

language-agnostic static-methods
calling member functions from within another member function of the same class in C++, objective C

Consider the following: class A{ //data members void foo() { bar();//is this possible? or should you say this->bar() …

c++ function static-methods member access-specifier
Call function from Main()

I am new to C# and I'm having a little problem with calling a function from the Main() method. class …

c# static-methods instance-methods
How to call C++ static method

Is it possible to return an object from a static method in C++ like there is in Java? I am …

c++ static-methods
`staticmethod` and `abc.abstractmethod`: Will it blend?

In my Python app I want to make a method that is both a staticmethod and an abc.abstractmethod. How …

python abstract-class static-methods
Why aren't static methods considered good OO practice?

I'm reading Programming Scala. At the beginning of chapter 4, the author comments that Java supports static methods, which are "not-so-pure …

java scala oop static-methods language-concepts
Why overloaded operators cannot be defined as static members of a class?

C++ syntax allows defining overloaded operators either inside the struct/class like: struct X { void operator+(X); } or outside of …

c++ operator-overloading static-methods
PHP Can static:: replace self::?

I am a little confused with this matter. I am designing an ORM class that tries to behave very similarly …

php static-methods static-members