Import java
import java.io.*;
/**
* An example of I/O streams in Java
*
* @author Professor David Bernstein
* @version 1.0
* @author Professor Elizabeth Adams
* @version 1.1
*/
public class WriterReaderExample
{
/**
* The entry point of the application
*
* @param args The command-line arguments
*/
public static void main(String[] args) throws IOException
{
BufferedReader myBufferedReader; // for input
PrintWriter myPrintWriter; // for output
String myStringData; // for data
//create BufferedReader object
myBufferedReader = new BufferedReader(new InputStreamReader(System.in));
myPrintWriter = new PrintWriter(System.out); // creates PrintWriter object
myPrintWriter.print("Enter a word: "); // prompts user
myPrintWriter.flush(); // empties the buffer
myStringData = myBufferedReader.readLine(); // gets the data
myPrintWriter.print("\nYou typed: " + myStringData + "\n"); // echoes the data
myPrintWriter.flush(); // flushes
}
}
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- import pdf to excel 2010
- minecraft import old account
- import minecraft account to mojang account
- import minecraft account
- what is an import broker
- import photos from phone
- how to import a minecraft account
- mojang import account
- import minecraft account mojang
- how to import minecraft account
- import broker
- import photos from android phone