Skip to main content

Java Constant

Java constant are defined in class as public static final with ALL_CAPS_WITH_UNDERSCORE name.

Example

class Worker {
public static final int DEAULT_THREADS = 10;
public static final String DEFAULT_NAME = "worker";
}

Naming

Use UPPER_SNAKE_CASE per google java style guide

References