I know the functions are loaded only once in the memory. My doubt is… if we create an object of a class how it refer the function? What is the thing behind the object creation and function calling? Is there any pointer in the object to the function?
Share
I believe you’re looking for the term “virtual method table“.
This is the mechanism that languages (compilers) use to determine what method to actually invoke when a call to a virtual function is made (and in Java all functions are virtual).