"Classes are represented in memory as areas where code and class shared objects are. The JVM use class loader to load classes and unload them if no more required at runtime as specified at https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.7, to name a very consolidated version of JVM. The interviewers supposed memory was freed without being subject to GC. I asked to discuss to clarify which hypothesis is right, the interviewers dismissed me. I'm very happy they didn't select m"
Luca D. - "Classes are represented in memory as areas where code and class shared objects are. The JVM use class loader to load classes and unload them if no more required at runtime as specified at https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.7, to name a very consolidated version of JVM. The interviewers supposed memory was freed without being subject to GC. I asked to discuss to clarify which hypothesis is right, the interviewers dismissed me. I'm very happy they didn't select m"See full answer