Home arrow Java arrow Java Part 5: Input And Output Operations
JAVA

Java Part 5: Input And Output Operations


In this article, Chris will continue his popular "Java How-To" series and teach us all how to create a simple Java application that will read a file and output its contents to the screen.

Author Info:
By: Chris Noack
Rating: 3 stars3 stars3 stars3 stars3 stars / 30
January 03, 2002
TABLE OF CONTENTS:
  1. · Java Part 5: Input And Output Operations
  2. · Our file I/O application explained
  3. · Our file I/O application explained (contd.)
  4. · Conclusion

print this article
SEARCH DEVARTICLES

Java Part 5: Input And Output Operations
(Page 1 of 4 )

Just like many other object-orientated programming languages, Java contains built in classes that we can instantiate throughout our applications. These allow us to use pre-created and tested modules, without having to re-invent the wheel every time we want to perform some common task, such as reading from or writing to a file.

In this article, I will continue down the road to learning Java and discuss how to create a simple Java application that will read a file and output its contents (line-by-line) to the screen. The application that I will discuss is essentially based on the Unix/Linux shell command "cat", which takes the name of a file from the command line and outputs the entire contents of that file to the display.

This article will also build on using classes and objects, as discussed in part 4 of this series. You should be familiar with Java basics (Parts 1, 2, 3 and 4 of this series) to get the most from this tutorial.
blog comments powered by Disqus
JAVA ARTICLES

- Java Too Insecure, Says Microsoft Researcher
- Google Beats Oracle in Java Ruling
- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials