This is probably overly pedantic, but I want to add something to the previous answers: yes, class variables are usually initialized with zero values, but not when they are final. For final variables, you must provide an initializer or initialize them in all constructors, as stated in Java Language Specification 8.3.1.2 (https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.3.1.2):
A blank
finalinstance variable must be definitely assigned and moreover not definitely unassigned at the end of every constructor of the class in which it is declared, or a compile-time error occurs.
For example, the following code does not compile:
class A {
final int x;
}