Scanner input = new Scanner(new File("temp.txt"));
System.out.print(input.nextLine());
package cn.netkiller.io;
import java.io.File;
import java.io.FileNotFoundException;
//import java.io.PrintWriter;
import java.util.Scanner;
public class PrintWriterTest {
private static Scanner input;
public PrintWriterTest() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) throws FileNotFoundException {
// TODO Auto-generated method stub
// PrintWriter output = new PrintWriter("temp.txt");
// output.print("Welcome to Java!");
// output.close();
input = new Scanner(new File("temp.txt"));
System.out.print(input.nextLine());
}
}