Learning code using Java