0
Isn't making properties 'static' similar to making methods 'final'? If I'm not wrong static properties are immutable right?
2 Answers
+ 4
assuming java, no static members can be mutable.
Static members are mainly used independently from the class or used without having a class object declaration
+ 1
Static members belong to the class and they are shared to their subsequent child classes as well. But when you declare the same identifier in your child class, you hide the one which is with the parent.
Final keyword makes a member immutable, so you cannot override a final method.
Hot today
I have made a calculator in which my % (Percentage) not work correctly for 100%50 or 100%20.
2 Votes
Python palindrome challenge.
1 Votes
Java
0 Votes
Тренажер кода
0 Votes
Number of Ones ( C++ ) question!
1 Votes