In C/C++ we have memset() function which can fulfill my wish but in Java how can i initialize all the elements to a specific value? Wh
C/C++
memset()
Java
There's also
int[] array = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1};