Chapter 8. Input and Output


8. Input and Output

In most cases, input and output is the ultimate goal of an application. An application is only useful if it can spit out results and take in user or machine generated input to process. In this chapter, we cover basic phrases for performing input and output.

The java.io and java.util packages are home to most of the classes that we will use in this chapter for performing input and output tasks. In this chapter, we will show you how to read and write files, work with zip archives, format your output, and work with the standard operating system streams.

As you read the phrases in this chapter, keep in mind that many of the phrases have the possibility of throwing exceptions such as the java.io.IOException in any real program. In the phrases, we do not include exception handling code. In any real application, exception handling is a necessity.




JavaT Phrasebook. Essential Code and Commands
Java Phrasebook
ISBN: 0672329077
EAN: 2147483647
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net