So, every Java text book talks about how flexible Java is since it can load classes at run time. Just cobble together a string and give it to Class.forName()
, and
Real-world example (as requested in your question), proprietary application (as explicitely allowed by your question)...
Upon startup, the client-side software contacts our server(s) and says "Default implementation of interface Bar I have is Foo (because actually every version 1.03, for example, are using Foo), do you have a better one?" If meanwhile we wrote a better implementation, we answer "yup, Bar is old, use Buz, it's better".
Then on the client side a class loader is used to load the latest implementation.
It's oversimplified but it's a real world example. It's not entirely dissimilar to the example JRL mentioned: where deprecated classes are automagically replaced by newer ones.