How can is initialize all variables in a Java class at once to zero -


i have java code class variables , rather set them particular value, i'd initialize zero. in c/c++, can memset() on size of structure, how do same thing in java?

primitives default zero. objects default null. see https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html. however, article mentions, relying on default value in java considered bad practice. better practice set them either when declare them or in constructor.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -