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.
2
Q
Can a class be marked as final?
A
Yes, once it is marked as final, it cannot be extended?
3
Q
Can a method be marked as final?
A
Yes, a final method cannot be overridden by a child class.
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.