Finish the basic average Java example