Line 17 does not throw an exception since its referencing null right. To my knowledge, we can downcast any non final class to any interface irrespective of their relation. But I do not understand why line 17 didn't throw an exception.