Statements (36)
| Predicate | Object |
|---|---|
| gptkbp:instanceOf |
gptkb:programming_language
|
| gptkbp:contrastsWith |
Dynamic (programming)
Instance (programming) |
| gptkbp:definedIn |
static keyword
|
| gptkbp:enables |
Class-level data
Class-level methods Encapsulation of implementation details Global state management |
| gptkbp:example |
public static void main(String[] args) (Java)
static function in C static int count = 0; (C/C++) static variable in Python (module-level) |
| gptkbp:hasProperty |
Persists for program lifetime
Scope limited to class or file Shared among all instances |
| gptkbp:limitation |
Can cause issues in multithreading
Can lead to hidden dependencies Limits inheritance (static methods) Reduces testability |
| gptkbp:relatedTo |
Static class
Static method Static variable |
| gptkbp:usedIn |
gptkb:Java
gptkb:JavaScript gptkb:Objective-C gptkb:Python gptkb:Swift gptkb:Go gptkb:C# gptkb:C++ gptkb:Rust C PHP |
| gptkbp:bfsParent |
gptkb:Static
|
| gptkbp:bfsLayer |
6
|
| https://www.w3.org/2000/01/rdf-schema#label |
Static (programming)
|