Question: can an array store elements of different data types? 1 ) Yes , as long as you specify the data type for each element when
can an array store elements of different data types? Yes as long as you specify the data type for each element when declaring the array. Yes Java automatically converts the elements to a common data type. No all elements in an array must have the same data type. Yes but you need to use type casting for each element.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
