you create array with fixed length. So the output print with zeros..

you refer this link: Java array declaration without hard coding the size - Stack Overflow