+ 5

Final and static

what is the difference between final and static keyword?

10th Dec 2017, 6:31 AM
Sahil Jain
Sahil Jain - avatar
2 Respostas
+ 9
Once it has been assigned, the value of the final variable cannot change. staticmeans it belongs to the class not an instance, this means that there is only one copy of that variable/method shared between all instances of a particular Class. ... This is where thestatic keyword comes in https://stackoverflow.com/questions/13772827/difference-between-static-and-final
10th Dec 2017, 6:38 AM
GAWEN STEASY
GAWEN STEASY - avatar
+ 2
thanks...
10th Dec 2017, 6:41 AM
Sahil Jain
Sahil Jain - avatar