title: Can an array contain integers and floats
body: <p>Somebody asked me: can an array in java contain integers and floats? She got that question from a teacher. </p>
  
  <p>Now my answer was: yes, since you can declare an array of objects and store integers and floats in it.</p>
  
  <p>But now I'm wondering if that is correct, since technically when you store Integer and Float objects in an array, it kind of does contain both types, but if you would "ask" the array he would tell you he contains Objects, and if I don't do bookkeeping or class checks there's no way to tell that there are integers and floats in the array.</p>
  
  <p>On the other hand I still feel it might be the right answer since theoretically the array contains objects of both types.</p>
  
  <p>So I'm asking for a smart opinion: if you were asked (in an interview, a test whatever) wether in java an array can contain integers and floats, yes or no? What would you answer?</p>