Answers for "static block vs instance block vs constructor"

0

static block vs instance block vs constructor

static block: executed first, one time only, does not depend on the object
instance block: depends on the object, runs before the constructor
constructor: depends on the object, runs after the instance block
Posted by: Guest on May-28-2021

Browse Popular Code Answers by Language