- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Static and Final in Java
In this post, we will understand the difference between ‘static’ and ‘final’ keywords in Java.
It can be applied to nested static class, variables, methods and block.
It is not required to initialize the static variable when it is declared.
This variable can be re-initialized.
It can access the static members of the class only.
It can be called only by other static methods.
Objects of static class can’t be created.
Static class can only contain static members.
It is used to initialize the static variables.
It is a keyword.
It is used to apply restrictions on classes, methods and variables.
It can’t be inherited.
It can’t be overridden.
Final methods can’t be inherited by any class.
It is needed to initialize the final variable when it is being declared.
Its value, once declared, can’t be changed or re-initialized.
- Static and non static blank final variables in Java
- Difference between constants and final variables in Java?
- Difference Between Final, Finally and Finalize in Java
- Final static variables in Java
- Difference between Static binding and dynamic binding in Java
- Difference between Static and Dynamic Testing
- Difference between Static and Shared libraries
- Difference Between Static and Dynamic Binding
- Explain the difference between static and dynamic binding in Java.
- Difference between default and static interface method in Java 8.
- What is the difference between final, finally and finalize() in Java?
- Initializer for final static field in Java
- What is the difference between static classes and non-static inner classes in Java?
- Difference between Static and Dynamic Web Pages