Organizational Research By

Surprising Reserch Topic

Question:What will be the default values of all the elements of an array defined as an instance variable?


If the array is an array of primitive types, then all the elements of the array will be initialized to the default value corresponding to that primitive type. e.g. All the elements of an array of int will be initialized to 0, while that of boolean type will be initialized to false. Whereas if the array is an array of references (of any type), all the elements will be initialized to null.
asked Sep 13, 2013 in Java Interview Questions by anonymous
edited Sep 12, 2013
0 votes
44 views



Related Hot Questions



Government Jobs Opening


...