Skip to content

Instantly share code, notes, and snippets.

@yenerm
Created May 17, 2020 22:59
Show Gist options
  • Save yenerm/4f7caae8740552871be33981a0453439 to your computer and use it in GitHub Desktop.
Save yenerm/4f7caae8740552871be33981a0453439 to your computer and use it in GitHub Desktop.
explicit cast and can result in runtime exception
String str = (String)list.get(1); // needs explicit cast, throws exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment