What is the memory footprint of a method intensive Java object?

java, memory-management

Solution

The memory footprint for loading the class itself will approximately correspond to the code size, but the code will not be duplicated for each instance of the class. An instance will only require as much memory as the instance attributes + some overhead for managing the object instance itself.

Problem

Suppose I have a Java class that has 100K worth of method code containing NO variables, but only 20 bytes of attributes. I instantiate 1000 objects from this class. Have I consumed 100,000K of memory? Or only 100K + (20bytes * 1000)? Or something else altogether?

Original source