read from file and store
===

I am trying to read a file and store it using hashmap, but there is this error "java.lang.ArrayIndexOutOfBoundsException: 0". My input has two columns separated by space something like
Name ID so on with different entries. Help is appreciated. Thanks.
   

    import java.util.*;
    class ReadFileAndStoreHashmap {	
    public static void main(String[] args)  {
        try{
        Scanner scanner = new Scanner(new FileReader(".txt"));
        
        HashMap<String, String> map = new LinkedHashMap<String, String>();

        while (scanner.hasNextLine()) {
        	 String[] columns = scanner.nextLine().split(" ");
        	 map.put(columns[0], columns[1]);
		 System.out.println(map);
		             		}
	                                }
       catch (Exception e){
        	
       System.out.println(e.toString());
             
     }
     }
     }





