Final Flashcards

1
Q

What is a final variable?

A

A final variable is one who’s value does not change. Once the value is set, it cannot be changed.

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

Can a class be marked as final?

A

Yes, once it is marked as final, it cannot be extended?

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

Can a method be marked as final?

A

Yes, a final method cannot be overridden by a child class.

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

What is a blank final variable?

A

When we declare a final variable without giving it an initial value, then it is called a blank final variable.

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