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
Yes, int values in an array are initialized to zero. But you are not guaranteed this. Oracle documentation states that this is a bad coding practice.