Apple Inc. closed out the June quarter with a bang, clinching a $3 trillion valuation for the first time.