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.

Ruby on rails - Static method

I want a method to be executed every 5 minutes, I implemented whenever for ruby (cron). But it does not work. …

ruby oop static-methods
Static properties in Swift

I'm trying to convert the following Objective-C code to Swift. In my Objective-C code, there's a static variable and its …

ios class swift static-methods static-members
Can a static method be overridden in C#?

I was told that static methods are implicitly final and therefore can't be overridden. Is that true? Can someone give …

c# overriding static-methods final
How to ensure thread safety of utility static method?

Is there any general way or rules exits by which we can ensure the thread safety of static methods specifically …

java oop thread-safety static-methods utility
Using private static methods

What do you think about using private static methods? Personally, I prefer using a static private method to non-static as …

java oop coding-style static-methods
Performance of static methods vs instance methods

My question is relating to the performance characteristics of static methods vs instance methods and their scalability. Assume for this …

c# performance static-methods il
Static method behavior in multi-threaded environment in java

There's a simple stupid question that bother me and make several arguments in my mind. I want to throw out …

java multithreading static-methods
Is there a way to call a non-static method from a static method?

Here's what I have. public static void Person_home_phone_TextChanged(object sender, EventArgs e) { ... } Is there any way to …

c# visual-studio-2012 static-methods non-static
When should I use static methods in a class and what are the benefits?

I have concept of static variables but what are the benefits of static methods in a class. I have worked …

oop static-methods static-variables
How can I dynamically create class methods for a class in python

If I define a little python program as class a(): def _func(self): return "asdf" # Not sure what to resplace __…

python class metaprogramming static-methods setattr