You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:
have access to post topics
communicate privately with other members (PM)
not see advertisements between posts
have the possibility to earn one of our surprises if you are an active member
access many other special features that will be introduced later.
import java.io.InputStream;
import java.util.Scanner;
import java.util.*;
/**
*
*/
public class InputReader
{
private Scanner reader;
Scanner in=new Scanner(System.in);
//scanner object to get input from keyboard later
/**
* Create a new InputReader that reads text from the text terminal.
*/
public InputReader()
{
reader = new Scanner(System.in);
}
/**
* Create a new InputReader that reads text from an input stream.
* @param in An input stream to read from.
*/
public InputReader(InputStream in) {
reader = new Scanner(in);
}
does any of this code do that already by any chance?