Our website is made possible by displaying online advertisements to our visitors.Please consider supporting us by disabling your ad blocker.
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu
Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Translate it in your own Language

Print this Job Post

Print Friendly and PDF

Tuesday, May 27, 2014

Core Java – OOPs Concepts: final keyword Interview Questions

Question-47: What is final variable?
Answer:
If you make any variable as final, you cannot change the value of final variable(It will be constant).


Question-48: What is final method?
Answer:
Final methods can’t be overridden..


Question-49: What is final class?
Answer:
Final class can’t be inherited.


Question-50: What is blank final variable?
Answer:
A final variable, not initalized at the time of declaration, is known as blank final variable.


Question-51: Can we intialize blank final variable?
Answer:
Yes, only in constructor if it is non-static. If it is static blank final variable, it can be initialized only in the static block.


Question-52: Can you declare the main method as final?
Answer:
Yes, such as, public static final void main(String[] args){}.

No comments:

Post a Comment

Copyright @ CrackMNC 2014-2024
Divas Nikhra Theme by Crack MNC