Static Flashcards

1
Q

a non-access modifier used for methods and attributes.

A

Static

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

TRUE OR FALSE?
Static methods/attributes can be accessed without creating an object of a class.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

TRUE OR FALSE?
A static method can be accessed without creating an object of the class first.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

variables that are specific to a particular instance of a class

A

Instance Variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to call static method in Java?

A

ClassName.methodName();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to call static variable from another class in Java?

A

ClassName.VariableName();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly