Search Interview Questions
| 3372 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. final keyword is a modifier that means differently when applied to variables, methods and classes. |
1. Final variable cannot be changed once initialized
2. Final method cannot be overridden
3. Final class cannot be sub classed
Sample Code for final variable
Sample Code for final method
Sample Code for final class
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  final  final keyword Asked in 1 Companies Basic   frequent|
|What is the difference between final, finally and finalize() ?|
| Which of the following combination of keywords is illegal in Java ? |
a. static and transient
b. transient and final
c. static and synchronized
d. abstract and final
|Difference between final and effectively final ? Why is effectively final even required ?|
| Which keyword is used to provide explicit access of a code block to single thread ? |
|What is a final method ?|
|Enums cannot be declared ..|
|What is a Final Variable ?|
|Can we override compareTo method for Enumerations ?|
|enums are intrinsically ..|
|When we say final x = 10, is the reference final or the value ?|