I have to read and store 70 millions of Double objects in a Vector. The problem is that it seems that Java will allocate 40 bytes of memory for each Double object and the memory amount we need to store such number of Doubles object is approximately 2.8 GB. It is very strange that a simple object like Double cost 40 bytes of memory. I am new in Java, before I have never faced the same issue with C++. Could you please let me know how large is the size of an object in Java?