Solved alternating characters in java

Signed-off-by: Ionut Radu <ihonius@gmail.com>