Use of Initializers vs Constructors in Java
问题 So I\'ve been brushing up on my Java skills as of late and have found a few bits of functionality that I didn\'t know about previously. Static and Instance Initializers are two such techniques. My question is when would one use an initializer instead of including the code in a constructor? I\'ve thought of a couple obvious possibilities: static/instance initializers can be used to set the value of \"final\" static/instance variables whereas a constructor cannot static initializers can be used