Java Arraylist Get Object In Array Javascript Methods Syntax Vs Semantics