primitive types (int
in your case) are initialized by default values automatically, so there no reason to explicitly set it to 0
;
What about Strings
and other objects: it's completely depends on your preferences. I prefer not to initialize it in constructor. But keep in mind that in case of initilizing fields in constructor you can handle exceptions if field initializing throws some exception