SlideShare a Scribd company logo
Standard input, output and
error
Lecture Under Construction
Contents
• Overview of I/O Streams
• Character Streams
• Byte Streams
• Using the Streams
• Object Serialization
• Working with Random Access files
• Standard IO Streams
Overview of I/O Streams
To bring in information, a program opens
a stream on an information source (a file,
memory, a socket) and reads the
information sequentially, as shown in the
following figure.
Similarly, a program can send
information to an external destination
by opening a stream to a destination
and writing the information out
sequentially, as shown in the following
figure.
Overview of I/O STREAMS
Contd.
Overview of I/O streams
Contd..
• The java.io package contains a collection
of stream classes that support algorithms
for reading and writing. To use these
classes, a program needs to import the
java.io package.
• The stream classes are divided into two
class hierarchies, based on the data type
(either characters or bytes) on which they
operate i.e Character Stream and Byte
Stream
Character Streams
• Reader and Writer are the abstract
superclasses for character streams in
java.io.
• Reader provides the API and partial
implementation for readers ( streams
that read 16-bit characters ) and
Writer provides the API and partial
implementation for writers ( streams
that write 16-bit characters).
Character Streams Contd.
• The following figure shows the class
hierarchies for the Reader and Writer
classes.
Byte Streams
• To read and write 8-bit bytes,
programs should use the byte streams,
descendents of InputStream and
OutputStream .
• InputStream and OutputStream
provide the API and partial
implementation for input streams
(streams that read 8-bit bytes) and
output streams (streams that write 8-
bit bytes).
Byte Streams (cont.)
• These streams are typically used to
read and write binary data such as
images and sounds.
• Two of the byte stream classes,
ObjectInputStream and
ObjectOutputStream, are used for
object serialization.
Byte Streams (cont.)
• The class hierarchy for the Reader Class
Byte Stream (cont.)
• Class hierarchy figure for Writer Class
How to Use File Streams
The file streams-- FileReader , FileWriter ,
FileInputStream , and FileOutputStream -- read or
write from a file on the native file system.
Here is simple code to create a file reader
File inputFile = new File("farrago.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
This reads characters from the reader as long as
there's more input in the input file and writes
those characters to the writer.
How to Use Pipe Streams
• Pipes are used to channel the output
from one thread into the input of
another. PipedReader and PipedWriter
(and their input and output stream
counterparts PipedInputStream and
PipedOutputStream ) implement the
input and output components of a
pipe.
How to wrap a stream
Streams are wrapped to combine the various
features of the many streams.
example code:
BufferedReader in = new
BufferedReader(source);
The code opens a BufferedReader on source,
which is another reader of a different type.
This essentially "wraps" source in a
BufferedReader. The program reads from the
BufferedReader, which in turn reads from
source.
How to Concatenate Files
• The SequenceInputStream creates a single
input stream from multiple input sources.
example code :
ListOfFiles mylist = new ListOfFiles(args);
SequenceInputStream s = new
SequenceInputStream(mylist);
Here, the mylist object is an enumeration
that SequenceInputStream uses to get a new
InputStream whenever it needs one.
Working with Filter Streams
• The java.io package provides a set of abstract
classes that define and partially implement
filter streams. A filter stream filters data as it's
being read from or written to the stream.
• The filter streams are FilterInputStream , and
FilterOutputStream .
• A filter stream is constructed on another
stream (the underlying stream).
Object Serialization
• Two stream classes in java.io,
ObjectInputStream and
ObjectOutputStream, are used to read
and write objects.
• The key to writing an object is to
represent its state in a serialized form
sufficient to reconstruct the object as it
is read. This process is called object
serialization.
Uses of Object Serialization
• Remote Method Invocation (RMI)--
communication between objects via
sockets
• Lightweight persistence--the archival
of an object for use in a later
invocation of the same program.
Working with Random
Access Files
• A random access file permits non-sequential or
random access to a file's contents.
• Using Random Access Files
Unlike the input and output stream classes in
java.io, RandomAccessFile is used for both
reading and writing files. You create a
RandomAccessFile object with different
arguments depending on whether you intend
to read or write.
Standard IO Streams
• There are three standard streams, all of which
are managed by the java.lang.System class
• Standard input--referenced by System.in
– Used for program input, typically reads input
entered by the user.
• Standard output--referenced by System.out
– Used for program output, typically displays
information to the user.
• Standard error--referenced by System.err
– Used to display error messages to the user.
References
• http://java.sun.com/docs/books/tutori
al/essential/TOC.html#io
• http://www.codeguru.com/java/tij/tij
0114.shtml

More Related Content

Similar to inputoutputstreams-140612032817-phpapp02.pdf

Input & output
Input & outputInput & output
Input & output
SAIFUR RAHMAN
 
Session 22 - Java IO, Serialization
Session 22 - Java IO, SerializationSession 22 - Java IO, Serialization
Session 22 - Java IO, Serialization
PawanMM
 
Java IO, Serialization
Java IO, Serialization Java IO, Serialization
Java IO, Serialization
Hitesh-Java
 
Chapter 2.1 : Data Stream
Chapter 2.1 : Data StreamChapter 2.1 : Data Stream
Chapter 2.1 : Data Stream
Ministry of Higher Education
 
CSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdfCSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdf
VithalReddy3
 
IOStream.pptx
IOStream.pptxIOStream.pptx
IOStream.pptx
HindAlmisbahi
 
Various io stream classes .47
Various io stream classes .47Various io stream classes .47
Various io stream classes .47
myrajendra
 
Various io stream classes .47
Various io stream classes .47Various io stream classes .47
Various io stream classes .47
myrajendra
 
input/ output in java
input/ output  in javainput/ output  in java
input/ output in java
sharma230399
 
Java program file I/O
Java program file I/OJava program file I/O
Java program file I/O
Nem Sothea
 
05io
05io05io
Lecture 23
Lecture 23Lecture 23
Lecture 23
Debasish Pratihari
 
Basic IO
Basic IOBasic IO
Basic IO
Ravi_Kant_Sahu
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scanner
Arif Ullah
 
Java programming Chapter 4.pptx
Java programming Chapter 4.pptxJava programming Chapter 4.pptx
Java programming Chapter 4.pptx
ssusera0d3d2
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
babak danyal
 
Computer science input and output BASICS.pptx
Computer science input and output BASICS.pptxComputer science input and output BASICS.pptx
Computer science input and output BASICS.pptx
RathanMB
 
32sql server
32sql server32sql server
32sql server
Sireesh K
 
Java input output package
Java input output packageJava input output package
Java input output package
Sujit Kumar
 
Java
JavaJava

Similar to inputoutputstreams-140612032817-phpapp02.pdf (20)

Input & output
Input & outputInput & output
Input & output
 
Session 22 - Java IO, Serialization
Session 22 - Java IO, SerializationSession 22 - Java IO, Serialization
Session 22 - Java IO, Serialization
 
Java IO, Serialization
Java IO, Serialization Java IO, Serialization
Java IO, Serialization
 
Chapter 2.1 : Data Stream
Chapter 2.1 : Data StreamChapter 2.1 : Data Stream
Chapter 2.1 : Data Stream
 
CSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdfCSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdf
 
IOStream.pptx
IOStream.pptxIOStream.pptx
IOStream.pptx
 
Various io stream classes .47
Various io stream classes .47Various io stream classes .47
Various io stream classes .47
 
Various io stream classes .47
Various io stream classes .47Various io stream classes .47
Various io stream classes .47
 
input/ output in java
input/ output  in javainput/ output  in java
input/ output in java
 
Java program file I/O
Java program file I/OJava program file I/O
Java program file I/O
 
05io
05io05io
05io
 
Lecture 23
Lecture 23Lecture 23
Lecture 23
 
Basic IO
Basic IOBasic IO
Basic IO
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scanner
 
Java programming Chapter 4.pptx
Java programming Chapter 4.pptxJava programming Chapter 4.pptx
Java programming Chapter 4.pptx
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Computer science input and output BASICS.pptx
Computer science input and output BASICS.pptxComputer science input and output BASICS.pptx
Computer science input and output BASICS.pptx
 
32sql server
32sql server32sql server
32sql server
 
Java input output package
Java input output packageJava input output package
Java input output package
 
Java
JavaJava
Java
 

Recently uploaded

C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 

inputoutputstreams-140612032817-phpapp02.pdf

  • 3. Contents • Overview of I/O Streams • Character Streams • Byte Streams • Using the Streams • Object Serialization • Working with Random Access files • Standard IO Streams
  • 4. Overview of I/O Streams To bring in information, a program opens a stream on an information source (a file, memory, a socket) and reads the information sequentially, as shown in the following figure.
  • 5. Similarly, a program can send information to an external destination by opening a stream to a destination and writing the information out sequentially, as shown in the following figure. Overview of I/O STREAMS Contd.
  • 6. Overview of I/O streams Contd.. • The java.io package contains a collection of stream classes that support algorithms for reading and writing. To use these classes, a program needs to import the java.io package. • The stream classes are divided into two class hierarchies, based on the data type (either characters or bytes) on which they operate i.e Character Stream and Byte Stream
  • 7. Character Streams • Reader and Writer are the abstract superclasses for character streams in java.io. • Reader provides the API and partial implementation for readers ( streams that read 16-bit characters ) and Writer provides the API and partial implementation for writers ( streams that write 16-bit characters).
  • 8. Character Streams Contd. • The following figure shows the class hierarchies for the Reader and Writer classes.
  • 9. Byte Streams • To read and write 8-bit bytes, programs should use the byte streams, descendents of InputStream and OutputStream . • InputStream and OutputStream provide the API and partial implementation for input streams (streams that read 8-bit bytes) and output streams (streams that write 8- bit bytes).
  • 10. Byte Streams (cont.) • These streams are typically used to read and write binary data such as images and sounds. • Two of the byte stream classes, ObjectInputStream and ObjectOutputStream, are used for object serialization.
  • 11. Byte Streams (cont.) • The class hierarchy for the Reader Class
  • 12. Byte Stream (cont.) • Class hierarchy figure for Writer Class
  • 13. How to Use File Streams The file streams-- FileReader , FileWriter , FileInputStream , and FileOutputStream -- read or write from a file on the native file system. Here is simple code to create a file reader File inputFile = new File("farrago.txt"); FileReader in = new FileReader(inputFile); FileWriter out = new FileWriter(outputFile); This reads characters from the reader as long as there's more input in the input file and writes those characters to the writer.
  • 14. How to Use Pipe Streams • Pipes are used to channel the output from one thread into the input of another. PipedReader and PipedWriter (and their input and output stream counterparts PipedInputStream and PipedOutputStream ) implement the input and output components of a pipe.
  • 15. How to wrap a stream Streams are wrapped to combine the various features of the many streams. example code: BufferedReader in = new BufferedReader(source); The code opens a BufferedReader on source, which is another reader of a different type. This essentially "wraps" source in a BufferedReader. The program reads from the BufferedReader, which in turn reads from source.
  • 16. How to Concatenate Files • The SequenceInputStream creates a single input stream from multiple input sources. example code : ListOfFiles mylist = new ListOfFiles(args); SequenceInputStream s = new SequenceInputStream(mylist); Here, the mylist object is an enumeration that SequenceInputStream uses to get a new InputStream whenever it needs one.
  • 17. Working with Filter Streams • The java.io package provides a set of abstract classes that define and partially implement filter streams. A filter stream filters data as it's being read from or written to the stream. • The filter streams are FilterInputStream , and FilterOutputStream . • A filter stream is constructed on another stream (the underlying stream).
  • 18. Object Serialization • Two stream classes in java.io, ObjectInputStream and ObjectOutputStream, are used to read and write objects. • The key to writing an object is to represent its state in a serialized form sufficient to reconstruct the object as it is read. This process is called object serialization.
  • 19. Uses of Object Serialization • Remote Method Invocation (RMI)-- communication between objects via sockets • Lightweight persistence--the archival of an object for use in a later invocation of the same program.
  • 20. Working with Random Access Files • A random access file permits non-sequential or random access to a file's contents. • Using Random Access Files Unlike the input and output stream classes in java.io, RandomAccessFile is used for both reading and writing files. You create a RandomAccessFile object with different arguments depending on whether you intend to read or write.
  • 21. Standard IO Streams • There are three standard streams, all of which are managed by the java.lang.System class • Standard input--referenced by System.in – Used for program input, typically reads input entered by the user. • Standard output--referenced by System.out – Used for program output, typically displays information to the user. • Standard error--referenced by System.err – Used to display error messages to the user.