The Labor Department said Thursday that the unemployment rate declined to a low 4.2% from 4.3% in May, though the decline mostly occurred because many people out of work gave up looking and were no longer counted as unemployed.