My Java Code for Problems in UVA