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
For Lists you can use
Collections.fill(arrayList, "-")