If a library provider changes an operation I don’t use, must I recompile my progra, that uses that class?

Suppose a class in a Java library advertises three operations op1, op2, and op3 in an interface. My program uses op1 through an import. The library maintainer changes op2 and op3, but my program only depends on op1. Must I recompile my program that uses op1 before I can run the program again?


Normally no, HOWEVER it’s usually a really bad idea just to swap out a library without testing your application, so recompiling isn’t really extra work.

Also now-a-days Java programs usually use a dependency building tool such as Maven or Gradle, and when you update a library using that, then the program is recompiled anyway.