Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

The ins and outs of standard input/output

Learn the basics of standard input, standard output, and standard error

  • Print
  • Feedback

Page 5 of 5

How do you use WordCount? Consider this example: count the number of words in a file called memo.txt by issuing the following command line: java WordCount <memo.txt.

Review

This article sheds the mystery from standard I/O. From a debugging perspective, you will find this simple mechanism to be helpful when developing Java programs -- even programs that present GUIs.

Next month, Java 101 picks up the pace when you begin exploring the object-oriented entities of the Java language.

About the author

Jeff Friesen has been involved with computers for the past 20 years. He holds a degree in computer science and has worked with many computer languages. Jeff has also taught introductory Java programming at the college level. In addition to writing for JavaWorld, he has written his own Java book for beginners -- Java 2 By Example, Second Edition (Que Publishing, 2001; ISBN: 0789725932) -- and helped write Special Edition Using Java 2 Platform (Que Publishing, 2001; ISBN: 0789720183). Jeff goes by the nickname Java Jeff (or JavaJeff). To see what he's working on, check out his Website at http://www.javajeff.com.
  • Print
  • Feedback

Resources