It is not always necessary to assign a value when declaring a field.
Fields declared but not initialized will be set to a reasonable default compiler. Generally speaking, this default value will be zero or zero, depending on the data type.
Data Type Default Value (for fields) byte 0 short 0 int 0 long 0L float 0.0f double 0.0d char '\u0000' String (or any object) null boolean false
PS: Based on such defaults, however, it is usually considered a bad programming style.
source share