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.

Static variables in member functions

Can someone please explain how static variables in member functions work in C++. Given the following class: class A { void …

c++ static scope
Static member initialization in a class template

I'd like to do this: template <typename T> struct S { ... static double something_relevant = 1.5; }; but I can't since …

c++ templates static
How do I create a static local variable in Java?

I've read Java does not support static local variables unlike C/C++. Now if I want to code a function …

java scope static
Static and Sealed class differences

Is there any class that be implemented in static class? means: static class ABC : Anyclass Is there any class which …

c# .net oop static sealed
C/C++: Static function in header file, what does it mean?

I know what it means when static function is declared in source file. I am reading some code, found that …

c function static
Undefined reference to static variable c++

Hi i am getting undefined reference error in the following code: class Helloworld{ public: static int x; void foo(); }; void …

c++ static
How do I access static member of a class?

I am trying to access static member of a class. my class is: class A { public static $strName = 'A is …

php class oop static member
Retrieve only static fields declared in Java class

I have the following class: public class Test { public static int a = 0; public int b = 1; } Is it possible to use …

java reflection static field
Should private helper methods be static if they can be static

Let's say I have a class designed to be instantiated. I have several private "helper" methods inside the class that …

java static methods static-methods
Difference between final static and static final

I found a code where it declared code like private final static String API_RTN_SUCCESS = "0"; private final static String …

java static final