title: how to simplify my java code which is containing the more ArrayList to store the values
body: <p>I am doing the Junit testing for some of the modules. I am reading input data and expected output from  the csv file and then i am storing each column in one arrayList and then i am putting all the column arrayLists into a Map. My problem is if one or two columns means its quite good to see the code but if more than one column in the csv file means it looks weird to see the code. I want to simplify this arrayList into some other java dataStructure if possible.</p>
  
  <pre><code>    //Loading Input Data File for Default Sorting
      static String attemptsString = "colAttempts";
      static String areacodeString = "colAreaCodes";
      static String startTimeString = "colStartIme";
      static String timezoneString = "colTimeZone";
      static String firstNameString = "colFirstName";
      static String expAttemptsOrderStr = "colExpAttempts";
      static String expAreaCodesOrderStr = "colExpAreaCodes";
      static String expStartTimeOrderStr = "colExpStartTimes";
      static String expTimeZoneOrderStr = "colExpTimeZone";
      static String expFirstNameOrderStr = "colExpFirstNames";
      static List&lt;String&gt; CN_inputAttempts = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_inputAreaCodes = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_inputStartTime = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_inputTimeZone = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_inputFirstNames = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_ExpOrderAttempts = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_ExpOrderAreaCodes = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_ExpOrderStartTime = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_ExpOrderTimeZone = new ArrayList&lt;String&gt;();
      static List&lt;String&gt; CN_ExpOrderFirstName = new ArrayList&lt;String&gt;();
  public static HashMap&lt;String, List&lt;String&gt;&gt; loadforConatactNameWithAreaCodes(String ContactNamesFileName) throws FileNotFoundException{
  
      HashMap&lt;String,List&lt;String&gt;&gt; contactNamewithAreaCodesMap = new HashMap&lt;&gt;();
  
      InputStream inputStream = new FileInputStream(ContactNamesFileName);
      try (BufferedReader br = new BufferedReader(new InputStreamReader(inputStream))){
              String[] dataArray = null;
              String line = "";
              int index = 0;
              /*
               * CSV File indexes values initialization
               */
              int ATTEMPTS = 0;
              int AREA_CODES = 1;
              int START_TIME = 2;
              int TIME_ZONE = 3;
              int FIRST_NAME = 4;
              int EXP_ORDER_ATTEMPTS = 5;
              int EXP_ORDER_AREACODES = 6;
              int EXP_ORDER_STARTTIME = 7;
              int EXP_ORDER_TIMEZONE = 8;
              int EXP_ORDER_FIRST_NAME = 9;
  
              while ((line = br.readLine()) != null) {
                  index++;
                  dataArray = line.split(csvSplitBy);
                  if (index == 1) {
                      continue;
                  }
                  if(line.contains("#")) {
                      System.out.println("Skipping commented Row in attempts Input Data Source at line "+index+" in "+ContactNamesFileName+" file");
                  }else {
                      if((dataArray[ATTEMPTS].length()&gt;0) &amp;&amp; (dataArray[AREA_CODES].length()&gt;0)  &amp;&amp; (dataArray[START_TIME].length()&gt;0) &amp;&amp; (dataArray[TIME_ZONE].length()&gt;0) &amp;&amp; (dataArray[FIRST_NAME].length()&gt;0) &amp;&amp; (dataArray[EXP_ORDER_ATTEMPTS].length()&gt;0)
                              &amp;&amp; (dataArray[EXP_ORDER_AREACODES].length()&gt;0) &amp;&amp; (dataArray[EXP_ORDER_STARTTIME].length()&gt;0)  &amp;&amp; (dataArray[EXP_ORDER_TIMEZONE].length()&gt;0) &amp;&amp; (dataArray[EXP_ORDER_FIRST_NAME].length()&gt;0)) {
                          CN_inputAttempts.add(dataArray[ATTEMPTS]);
                          CN_inputAreaCodes.add(dataArray[AREA_CODES]);
                          CN_inputStartTime.add(dataArray[START_TIME]);
                          CN_inputTimeZone.add(dataArray[TIME_ZONE]);
                          CN_inputFirstNames.add(dataArray[FIRST_NAME]);
                          CN_ExpOrderAttempts.add(dataArray[EXP_ORDER_ATTEMPTS]);
                          CN_ExpOrderAreaCodes.add(dataArray[EXP_ORDER_AREACODES]);
                          CN_ExpOrderStartTime.add(dataArray[EXP_ORDER_STARTTIME]);
                          CN_ExpOrderTimeZone.add(dataArray[EXP_ORDER_TIMEZONE]);
                          CN_ExpOrderFirstName.add(dataArray[EXP_ORDER_FIRST_NAME]);
  
                          contactNamewithAreaCodesMap.put(attemptsString,CN_inputAttempts);
                          contactNamewithAreaCodesMap.put(areacodeString,CN_inputAreaCodes);
                          contactNamewithAreaCodesMap.put(startTimeString,CN_inputStartTime);
                          contactNamewithAreaCodesMap.put(timezoneString,CN_inputTimeZone);
                          contactNamewithAreaCodesMap.put(firstNameString,CN_inputFirstNames);
                          contactNamewithAreaCodesMap.put(expAttemptsOrderStr,CN_ExpOrderAttempts);
                          contactNamewithAreaCodesMap.put(expAreaCodesOrderStr,CN_ExpOrderAreaCodes);
                          contactNamewithAreaCodesMap.put(expStartTimeOrderStr,CN_ExpOrderStartTime);
                          contactNamewithAreaCodesMap.put(expTimeZoneOrderStr,CN_ExpOrderTimeZone);
                          contactNamewithAreaCodesMap.put(expFirstNameOrderStr,CN_ExpOrderFirstName);
  
                      }else {
                          System.out.println("Object not created for data at line "+index+" in "+ContactNamesFileName+" file");
                      }
                  }
           }              
      } catch (FileNotFoundException e) {
              e.printStackTrace();
      } catch (IOException e1) {
              e1.printStackTrace();
      }
      return contactNamewithAreaCodesMap;
  
  }
  
  </code></pre>