Adding two last java exercises