Top "Static" questions

Static is a term used in some programming languages to define a function or data storage area (field) that is not bound to any specific object instance.

Initialize static variables in C++ class?

I have noticed that some of my functions in a class are actually not accessing the object, so I made …

c++ static initialization
Change private static final field using Java reflection

I have a class with a private static final field that, unfortunately, I need to change it at run-time. Using …

java reflection static private final
Why are static variables considered evil?

I am a Java programmer who is new to the corporate world. Recently I've developed an application using Groovy and …

java static
What's a "static method" in C#?

What does it mean when you add the static keyword to a method? public static void doSomething(){ //Well, do something! } …

c# methods static
What is the difference between a static and a non-static initialization code block

My question is about one particular usage of static keyword. It is possible to use static keyword to cover a …

java static static-initializer
Can I override and overload static methods in Java?

I'd like to know: Why can't static methods be overridden in Java? Can static methods be overloaded in Java?

java static overloading overriding
Static array vs. dynamic array in C++

What is the difference between a static array and a dynamic array in C++? I have to do an assignment …

c++ dynamic arrays static allocation
New self vs. new static

I am converting a PHP 5.3 library to work on PHP 5.2. The main thing standing in my way is the use …

php static late-static-binding
Static Initialization Blocks

As far as I understood the "static initialization block" is used to set values of static field if it cannot …

java static initialization static-block initialization-block
Difference between Static methods and Instance methods

I was just reading over the text given to me in my textbook and I'm not really sure I understand …

java static static-methods non-static