Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Thanks. That's interesting. Is there a global setting to always use ArrayList instead of List? Actually maybe global is too much... per file setting.


So by default the type inferred is ArrayList, if you want a different type you just specify it.

ex. var strings = { "red", "green", "blue" } //ArrayList

var strings2 : LinkedList<String> = { "red", "green", "blue" }


thanks




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: