+ 1
Can we hold heterogeneous data in one array in java.
Can we hold heterogeneous data in one array in java.
3 Answers
+ 5
Java array can store only same type of data.
+ 4
Not heterogeneous but if you're okay with reference types then you can use an Object array.
https://code.sololearn.com/cbEyJo66ftpt/?ref=app
+ 3
Swamy,
Please avoid copying the question into the tags.
https://code.sololearn.com/W3uiji9X28C1/?ref=app