from a file of random phone numbers. a lot of them...
im not new to programming and i want to really understand this so i was wondering i put up my code could i get some constuctive feed back about what might be wrong or missing from my approach. what i really dont want is the entire code just fed to me.. so in a lil while im gonna post what i got so far and hopefully someone will constuctively tear my code apart... just please be gental... hahaha :)
The attached file is the 8,000,000 random phone number.
Expand|Select|Wrap|Line Numbers
- import java.io.File;
- import java.io.*;
- import java.util.*;
- import java.util.Arrays;
- public class d3
- {
- public static void main (String[] args) throws Exception
- {
- FileReader fr;
- try
- {
- fr = new FileReader(args[0]);
- }
- catch (FileNotFoundException e)
- {
- System.out.println("File Not Found.");
- return;
- }
- Scanner sc = new Scanner(fr);
- while (sc.hasNextLine())
- {
- int[] phone_num = new int[8000000];
- String[] phone_num_str;
- phone_num_str = new String[8000000];
- phone_num_str = sc.nextLine();
- phone_num_str = phone_num_file;
- phone_num = Integer.parseInt(phone_num_str);
- }
- }
- }
so, i know im missing a lot but i thought this would work at least but i was mistaken... im thinking it has to do with my while() arguement? im working on it but if theres an even bigger mistake (im sure there is) let me know.... thankz!