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
If you are using Float or Integer then you can assign default value like this ...
Integer[] data = new Integer[20]; Arrays.fill(data,new Integer(0));