Welcome sthorat,
Arrays are initialized to their default values when they are created; regardless of where they appear in the code. Simply declaring an array does not cause it to be initialized.
For example,
Please read the JavaRanch
naming policy and re-register with a name that complies with the rules.
Thanks for your cooperation.
------------------
Jane
The cure for boredom is curiosity.
There is no cure for curiosity.
-- Dorothy Parker