Sollicitatievraag bij Google

How does the Java compiler handle a virtual function? -- I have not taken compilers and could not answer this question.

Antwoord op sollicitatievraag

Anoniem

13 aug 2014

probably the question was related to polymorphism. Doesn't need heavy compiler knowledge I guess. The answer could be "Runtime compilation based on the Object calling the function". Say Cat and dog inherits Animal interface which has a virtual function/method makeNoise() how it is handled?