In Java, what’s the difference between:

private final static int NUMBER = 10;

and

private final int NUMBER = 10;

Both are private and final, the difference is the static attribute.

What’s better? And why?

22 Answers
22

Leave a Reply

Your email address will not be published. Required fields are marked *