title: How to get a text file into an array and search for specific values but being limited to One-Dimensional arrays
body: <p>As the title says, I'm trying to get this <a href="https://i.stack.imgur.com/0rDy6.png" rel="nofollow noreferrer">Weather Station Data File</a> into an array and be able to search for specific values in the file via a menu system. I built the menu system but have no clue on how to import the file to such an array or series of arrays. The only problem I have is that I am limited to using a one-dimensional array for the data. Neither my textbook nor professor have been of any help. Here is what I have so far:</p>
  
  <pre><code>import java.io.*;
  import java.util.*;
  
  public class VidrioTomas2 {
  public static void main(String[] args) 
    throws FileNotFoundException {
  
    System.out.println("Please give the data titled 'Bellevue College Weather Station Data.txt'.");
    System.out.println("The data must be in the 10 minute data format.");
    Scanner console = new Scanner (System.in);
    System.out.print("Please type the file name: ");
    String name = console.nextLine(); //Uses the user input to find the file.
    if (name.equals("Bellevue College Weather Station Data.txt")) { //Needs to type the.txt and in the way the program says it is.
       System.out.println("\nFile name secured. Proceeding to next step.");
       File input = new File(name); //Stores the file into a value that can used in other methods.
    if(input.length() == 67481){
       System.out.println("\nLength of file: " + input.length() + "\nConfirmation of data. Proceeding to next step."); //Used as a confirmation that the file is true and working.
       System.out.println("The following options are available. Please select one of them.");
       System.out.println("1) Peak Wind Speed" 
                         + "\n2) Maximum Temperature" 
                         + "\n3) Humidity and Temperature" 
                         + "\n4) Solar Energy" 
                         + "\n5) End Program");
       Scanner secondConsole = new Scanner (System.in);
       System.out.print("Your selection: ");
       int choice = secondConsole.nextInt();//Uses the user input to start up one of the options.
          switch (choice) {
             case 1:
                System.out.println("Starting Peak Wind Speed Calculation. . .");
                peakWindSpeedCalc(input);
                break;
             case 2:
                System.out.println("Starting Maximum Temperature Calculation. . .");
                maximumTempCalc(input);
                break;
             case 3:
                System.out.println("Starting Humidity and Temperature Calculation. . .");
                humidAndTempCalc(input);
                break;
             case 4:
                System.out.println("Starting Solar Energy Calculation. . .");
                solarEnergyCalc(input);
                break;
             case 5:
                System.out.println("Ending program. . .");
                break;
          }
         } else {
          System.out.println("Inproper file. Ending program. . ."); //Kills if the length is not the same. The file I had had a length of 67481.
          }
    } else {
       System.out.println("\nInproper name or type. Ending program. . ."); //Kills if file name is wrong. Caps sensitive.
    }
  } 
  
  public static void peakWindSpeedCalc(File rawData) {
    System.out.println("Placeholder.exe is active. peakWindSpeedCalc is linked correctly.");
  }
  
  public static void maximumTempCalc(File rawData) {
    System.out.println("Placeholder.exe is active. maximumTempCalc is linked correctly.");
  }
  
  public static void humidAndTempCalc(File rawData) {
    System.out.println("Placeholder.exe is active. humdAndTempCalc is linked correctly.");
  }
  
  public static void solarEnergyCalc(File rawData) {
    System.out.println("Placeholder.exe is active. solarEnergyCalc is linked correctly.");
  }
  } 
  </code></pre>