AP® Computer Science A glossary

IOException

Course: AP® Computer Science A Shows up in: Unit 4: Data Collections

The java.io exception class for input and output problems; adding throws IOException to a method header handles a file that cannot be opened.

Appears in the course and exam description (CED): 4.6.A.44.6.A.5

Without throws IOException (or other handling) the code does not compile: error: unreported exception FileNotFoundException; must be caught or declared to be thrown. With it, an invalid file name makes the program terminate with a FileNotFoundException, a kind of IOException.

Learn it properly, with a checkpoint 4.6 Using Text Files

Related terms

Was this page helpful?

No names are ever shown, and every public comment is checked by us first. Please do not include personal details. To get a reply, email [email protected].

↑ Top

Enlarged view of the selected figure