I am trying to understand the memory management scheme for JVM
Consider two classes A, B
Class A {
public A() {
//Do Something
}
}
Class B() extends A{
public B(){
super();
// DO something again
}
}
From main B b = new B();
As per my knowledge the Class loader will load A, B and will create 2 objects each. Is there any other object that would get created?
Also the second part of my question is that , while accessing Java Visual VM , I see objects of Java NIO package has been created. Is there any way I can prevent JVM from creating objects which are not related to my project?