Allowance for Doubtful Accounts (Detail) - Allowance for doubtful accounts - USD ($) $ in Millions |
12 Months Ended | ||
|---|---|---|---|
Jun. 30, 2018 |
Jun. 30, 2017 |
Jun. 30, 2016 |
|
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Balance, beginning of period | $ 361 | $ 409 | $ 289 |
| Charged to costs and other | 134 | 58 | 175 |
| Write-offs | (98) | (106) | (55) |
| Balance, end of period | 397 | 361 | 409 |
| Accounts receivable, net of allowance for doubtful accounts | |||
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Balance, beginning of period | 345 | 392 | |
| Balance, end of period | 377 | 345 | 392 |
| Other Long-term Assets | |||
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Balance, beginning of period | 16 | 17 | |
| Balance, end of period | $ 20 | $ 16 | $ 17 |