No. Your programs can now deal with a massive amount of data as long as it is in text form.
import java.util.Scanner; class Echo { public static void main ( String[] args ) { Scanner scan = new Scanner( System.in ); String line; System.out.println("Enter your input:"); line = scan.nextLine(); System.out.println( "You typed: " + line ); } }
You can write a program to use any type of file as input, but this chapter only discusses input from text files. This example program reads input from the keyboard. Here (again) is how it ordinarily works:
C:\temp>java Echo Enter your input: This came from the keyboard You typed: This came from the keyboard C:\temp>
How many lines of text does the program read?