There is no such thing as a Java class without a parent class. The default parent would be used, e.g. java.lang.Object
.
At a minimum every instance of a class has two attributes: a reference address and a Class
type. Note, not every class can be instantiated. There is also some space used in the ClassLoader
and any String(s) may (or may not) be interned. This actual implementation might vary slightly on the specific version of the JDK and run-time platform, and additional optimizations can be added by the JIT. However, as a Java developer you are not responsible for this memory management and I would be wary of premature optimization.