In C/C++ I used to do
C/C++
int arr[10] = {0};
...to initialize all my array elements to 0.
Is there a similar shortcut in
declare the array as instance variable in the class i.e. out of every method and JVM will give it 0 as default value. You need not to worry anymore