Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.FileNotFoundException;
- import java.io.File;
- import java.io.PrintWriter;
- import java.util.Scanner;
- /** tests readWrite method */
- public class Lab11{
- public static void main (String[] args) throws FileNotFoundException {
- File telephoneNumbers = new File("telephone.txt");
- File words = new File("samplewords.txt");
- int[] numbersArr = getPhoneNumberArray(telephoneNumbers);
- }
- public static int[] getPhoneNumberArray(File inputFile) throws FileNotFoundException {
- Scanner in = new Scanner(inputFile);
- String tmp = "";
- String[] out = new Str[1000];
- while (in.hasNext()) {
- tmp = in.next();
- if (tmp.contains("604"))
- continue;
- else
- System.out.println(tmp);
- }
- int[] x = {1,2,3};
- return x;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement