| GOODWILL AND PURCHASED INTANGIBLE ASSETS - Schedule of Goodwill (Details) $ in Thousands | 3 Months Ended | 
|---|---|
| Sep. 30, 2023  USD ($) | |
| Goodwill [Roll Forward] | |
| Beginning balance | $ 2,278,820 | 
| Foreign currency adjustments | (15) | 
| Ending balance | 2,278,805 | 
| Wafer Inspection and Patterning | |
| Goodwill [Roll Forward] | |
| Beginning balance | 727,130 | 
| Foreign currency adjustments | (15) | 
| Ending balance | 727,115 | 
| Global Service and Support (“GSS”) | |
| Goodwill [Roll Forward] | |
| Beginning balance | 25,908 | 
| Foreign currency adjustments | 0 | 
| Ending balance | 25,908 | 
| Specialty Semiconductor Process | |
| Goodwill [Roll Forward] | |
| Beginning balance | 681,858 | 
| Foreign currency adjustments | 0 | 
| Ending balance | 681,858 | 
| Printed Circuit Board (“PCB”) and Display | |
| Goodwill [Roll Forward] | |
| Beginning balance | 830,349 | 
| Foreign currency adjustments | 0 | 
| Ending balance | 830,349 | 
| Component Inspection | |
| Goodwill [Roll Forward] | |
| Beginning balance | 13,575 | 
| Foreign currency adjustments | 0 | 
| Ending balance | $ 13,575 | 
| X | ||||||||||
| 
- Definition Amount after accumulated impairment loss of an asset representing future economic benefits arising from other assets acquired in a business combination that are not individually identified and separately recognized. Reference 1: http://www.xbrl.org/2003/role/exampleRef 
 | 
| X | ||||||||||
| 
- Definition Amount of foreign currency translation gain (loss) which increases (decreases) an asset representing future economic benefits from other assets acquired in a business combination that are not individually identified and separately recognized. Reference 1: http://www.xbrl.org/2003/role/disclosureRef 
 | 
| X | ||||||||||
| 
- Definition A roll forward is a reconciliation of a concept from the beginning of a period to the end of a period. No definition available. 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |