U.S. stocks closed higher, with the Dow and S&P rebounding from their biggest losses of the year, as a last-minute diplomatic scramble got under way to keep Greece from defaulting on its debt payments.
Eight sectors finished the month in negative territory. The Semiconductor Index lost 8.7% in June.