Static Flashcards
1
Q
a non-access modifier used for methods and attributes.
A
Static
2
Q
TRUE OR FALSE?
Static methods/attributes can be accessed without creating an object of a class.
A
True
3
Q
TRUE OR FALSE?
A static method can be accessed without creating an object of the class first.
A
TRUE
4
Q
variables that are specific to a particular instance of a class
A
Instance Variable
5
Q
a variable that has been allocated “statically”, meaning that its lifetime (or “extent”) is the entire run of the program.
A
static variable
6
Q
How to call static method in Java?
A
ClassName.methodName();
7
Q
How to call static variable from another class in Java?
A
ClassName.VariableName();