Java Reverse and Add solution