Skip to content

Instantly share code, notes, and snippets.

@jwalgemoed

jwalgemoed/interface.java

Last active May 20, 2018
Embed
What would you like to do?
// 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