some java class exercises
minor changes

fixed the println method to write a “.” after the last array element