Java Arraylist Class Objects Javascript Mdn Math Function