package sample.program;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class SampleProgram {
public static void main(String[] args) throws FileNotFoundException {
File file = new File("yahoo/yahoo.in");
Scanner scanner = new Scanner(file);
while (scanner.hasNext()) {
String[] inputs = scanner.nextLine().split(" ");
for (int index = 0; index < inputs.length; index++) {
System.out.print(inputs[index] + " ");
}
System.out.println();
}
scanner.close();
}}
Walang komento:
Mag-post ng isang Komento