Add problem 5's Java file