According to our dynamic binding discussion, the code would work just fine. The JVM would see a Dog object in the obj reference variable and bind the Dog’s display method to the obj.display method call. But it doesn’t matter that the code works fine in terms of dynamic binding. The code won’t compile successfully because the compiler senses there might be a problem.