Java Logic Order Of Operations