+ 19

Can anyone explain what is homogeneous and heterogeneous ?

I see one question says "What kind of data Arrays stores in Java ? homogeneous only or heterogeneous only ?" These words confuse me, what's the meaning of "homogeneous" and "heterogeneous" ? Can someone explain this point with examples ? And what are the main differences between homogeneous and heterogeneous ? P.S. Answers can be applied to any kinds of languages.

26th Oct 2017, 1:08 PM
Corey
Corey - avatar
8 Respuestas
+ 8
"homo-" means same, "hetero-" means different. In your case in particular they mean that a single Java array can only store one type, say, only numbers, or only strings. In Javascript for example arrays are heterogeneous, because I can make an array that holds [5, "hello", new Object()], and in Java that's not possible.
26th Oct 2017, 1:28 PM
Schindlabua
Schindlabua - avatar
+ 13
Chemistry is too hard for me.
27th Oct 2017, 12:41 PM
Corey
Corey - avatar
+ 4
Homogeneous means the same type. Heterogeneous means diverse types. Arrays are homogeneous, since you declare the single type as part of the definition. Class data tends to be heterogeneous as you have integers, strings, other classes, etcetera.
26th Oct 2017, 1:32 PM
John Wells
John Wells - avatar
+ 3
wait!!! today was my chemistry exam . the mixture where the solute and solvent are divided equally is homogeneous heterogeneous is vice versa
27th Oct 2017, 11:43 AM
Aaditya Aryal
Aaditya Aryal - avatar
+ 3
homogeneous means the same, heterogeneous means different
28th Oct 2017, 12:28 AM
Lili
Lili - avatar
+ 2
If a perticular set of objects belongs to same type then they are homogeneous else heterogeneous.
27th Oct 2017, 8:46 PM
Bhushan Bagul
Bhushan Bagul - avatar
+ 1
Chemie is boring
27th Oct 2017, 12:50 PM
Daniel
Daniel - avatar
+ 1
homo = home home = similar members
27th Oct 2017, 2:31 PM
sumit sangwan
sumit sangwan - avatar