java - Reasons for declaring a private static final variable -


why declare static final variable private immutable type?

could possibly harm declare them public on case?

so nobody can access outside , rely on value, giving freedom change without risk of side-effect (at least outside of class it's declared).


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -