Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "static final int" mean? [closed]

Tags:

java

final

I'm new to java and the book surprisingly started using this without explaining it even once. Why does stack overflow want me to write even more than I actually need?

like image 418
Tomer8009 Avatar asked Mar 27 '26 18:03

Tomer8009


1 Answers

static means that instead of each instance of the class having that variable, the variable belongs to the class as a whole.

final means that the values are constant and cannot be changed.

Basically what this means is that it's an integer that is constant for all instances of a certain class at all times.

like image 79
Epiglottal Axolotl Avatar answered Mar 30 '26 07:03

Epiglottal Axolotl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!