Please correct me if I&#x27;m wrong...<p>Q: What is the size ratio of Integer to int?<p>An int is 4 bytes, an Integer additionally has a 2 word object header (8 bytes) and a 4 byte reference pointing to it. This adds up to 12 bytes for the object, which is rounded up to 16 bytes, because Hotspot aligns objects to 8 byte boundaries. Including the reference, the Integer needs 20 bytes, or 5 times as much as an int.<p>Q: How many bytes in an 8-character String?<p><pre><code>  * object header: 8 bytes
  * reference to char[] storing the value: 4 bytes
  * int field to cache hashcode: 4 bytes
  -&gt; 16 bytes for &quot;wrapper&quot;
  * char[] storing the value:
      8 characters in UTF16: 16 bytes
      object header: 8 bytes
      length field: 4 bytes length
      -&gt; 28 bytes, rounded up to 32 bytes
  total: 48 bytes

</code></pre>
Q: Which of the following is true about HashSet relative to HashMap<p>d. does less, bigger: HashSet is a wrapper around HashMap<p>Q: Put the following 2-element collections in size order: ArrayList, HashSet, LinkedList, HashMap<p>Excluding the size of the actual elements:<p><pre><code>  * ArrayList, created with initial capacity of 2 (vs. default of 10):
      * object header: 8 bytes
      * size int: 4 bytes
      * reference to Object[] holding element data: 4 bytes
      -&gt; 16 bytes for wrapper
      * element data with 2 pointers: 2*4 bytes + 12 bytes, rounded
        up to 24 bytes
      -&gt; 40 bytes total

  * LinkedList:
      * object header: 8 bytes
      * size int: 4 bytes
      * references to first + last node: 8 bytes
      -&gt; 20 bytes, rounded up to 24 bytes
      * nodes (2x):
          * object header: 8 bytes
          * references to previous and next item: 8 bytes
          * reference to element data: 4 bytes
          -&gt; 20 bytes, rounded up to 24
      -&gt; 72 bytes total

  * HashMap, created with initial capacity of 2 (vs. 16) and default
    load factor of 0.75
      * object header: 8 bytes
      * modification count int: 4 bytes
      * size int: 4 bytes
      * load factor float: 4 bytes
      * entry set: ?
      * resizing threshold int: 4 bytes
      * pointer to hash table: 4 bytes
      -&gt; 28 bytes for wrapper, rounded up to 32 bytes
      * hash table (Node[]):
          * object header: 8 bytes
          * length field: 4 bytes
          * pointers: 4 * 4 bytes
          -&gt; 28 bytes, rounded up to 32 bytes
      * Node objects (2x):
          * object header: 8 bytes
          * hashcode int: 4 bytes
          * pointer to next node in chain: 4 bytes
          * pointer to element data: 4 bytes
          -&gt; 20 bytes, rounded up to 24 bytes
      -&gt; total of 120 bytes

  * HashSet, created with initial capacity of 2 (vs. 16) and default
    load factor of 0.75
      * object header: 8 bytes
      * pointer to HashMap: 4 bytes
      -&gt; 12 bytes for wrapper, rounded up to 16
      * HashMap: 120 bytes
      -&gt; 132 bytes total</code></pre>