Late binding/resolution by jvm helps prevent breking of code of current method for changes in class it uses

StackOverflow https://stackoverflow.com/questions/17137253

Question

read it in jvm spec that Late binding/resolution of methods and variables by jvm helps prevent breaking of code in current method if there are any changes in some class it uses. This does not make it clear enough . How is late binding helpful in achieving this.

Late binding as i understand is just that a direct refrence to a type is kept in the pool constant just at the time a refrence for that type is first used in the code .

Was it helpful?

Solution

If there is a missing method or a method with a changed signature but you don't use it, you won't get an error.

It doesn't eagerly check all the binding on startup.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top