Last active
May 20, 2018 09:08
-
-
Save jwalgemoed/7a9798ffcac95875132afbae0830a3ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We can explicitly work against interfaces | |
List<String> list = new ArrayList(); // type: List<String> | |
// Using var, we can't do this without casting | |
var list = new ArrayList<String>(); // Inferred type ArrayList<String> | |
var list = (List)new ArrayList<String>(); // Inferred type List<String> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment