what will be the default values of all the


What will be the default values of all the elements of an array explained 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.

Example: All the elements of an array of int will be initialized to 0(zero), while that of Boolean type will be initialized to false. While if the array is an array of references (of any type), all the elements will be initialized to null.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what will be the default values of all the
Reference No:- TGS0311005

Expected delivery within 24 Hours