In short, Liskov's Substitution Principle states that instances of the base (super) class should be completely replaceable with instances its derived (sub) classes without introducing any "breaking code" like throwing new errors, changing the contract of the methods, etc.
This means java.lang.Object should be replaceable with instances of any of its subclasses everywhere. However, every class is a subtype of Object.
I can instantiate a class say, for example, NetworkAdapter and pass it as an Object and according to LSP, I should be able to cast that Object instance into a random subclass, say Foo? However, NetworkAdapter and Foo are completely incompatible with each other.
NetworkAdapter nA = new NetworkAdapter(); Object obj = (Object) nA; // completely okay and legal Foo foo = (Foo) obj; // ??? this would throw ClassCastException! Am I understanding LSP wrong? Or does the structure of the Java language violate LSP in some cases?