I was wondering what could be the size of an object of an empty class. It surely could not be 0 bytes since it should be possible to reference and
empty class -that class does not contain any content.
any class which is not empty will be represented by its content in memory.
now how empty class will be represented in memory? as it has no content no way to show its existance in memory, but class is present ,it is mandatory to show its presence in memory. To show empty class presence in memory 1 byte is required.