Shawn
12/01/2017, 2:50 AMA can always be cast to B, then the language lets you assert that unsafely. If you think there’s at all a chance you’ll run into a ClassCastException (and that you can safely recover from this), use as? and use tools like safe navigation and/or the elvis operator to handle it