As far as I know, Java deals with constant variables ยง4.12.4 by constant folding in compile time. I’ve tried my best, but I couldn’t find its description from JLS. Could anybody tell me where I could find official description of the constant folding process for Java 11? Answer The specification does not use the term Constant Folding. It has the