Read a csv file and separate lines into key and value to put in a hash table
<p>So a little info about my program, I implemented a hash table with separate chaining to handle collisions.</p>

<pre><code>class TableInput{

     Object key;
     Object value;
     TableInput(Object key, Object value){
        this.key = key;
        this.value = value;
    }
}
abstract class HashTable {
    protected TableInput[] tableInput;
    protected int size;
    HashTable (int size) {
        this.size = size;
        tableInput = new TableInput[size];
        for (int i = 0; i &lt;= size - 1; i++){
            tableInput[i] = null;
        }
    }
    abstract int hash(Object key);
    public abstract void insert(Object key, Object value);
    public abstract Object retrieve(Object key);
}
class ChainedTableInput extends TableInput {
    ChainedTableInput(Object key, Object value){
        super(key, value);
        this.next = null;
    }
     ChainedTableInput next;
}
 class ChainedHashTable extends HashTable {

    ChainedHashTable(int size) {
        super(size);
        // TODO Auto-generated constructor stub
    }
    public int hash(Object key){
        return key.hashCode() % size;

    }
    public Object retrieve(Object key){
        ChainedTableInput p;
        p = (ChainedTableInput) tableInput[hash(key)];
        while(p != null &amp;&amp; !p.key.equals(key)){
            p = p.next;
        }
        if (p != null){
            return p.value;
        }
        else {
            return null;
        }
    }

    public void insert(Object key, Object value){
        ChainedTableInput entry = new ChainedTableInput(key, value);
        int k = hash(key);
        ChainedTableInput p = (ChainedTableInput) tableInput[k];
        if (p == null){
            tableInput[k] = entry;
            return;
        }
        while(!p.key.equals(key) &amp;&amp; p.next != null){
            p = p.next;
        }
        if (!p.key.equals(key)){
            p.next = entry;
        }
    }
    public double distance(Object key1, Object key2){
        final int R = 6373;
        Double lat1 = Double.parseDouble(Object);

    }
    }   
</code></pre>

<p>Now I have a csv file that contains city names, latitude and longitude.  I need to read the csv file from the command line argument and input the city names as the keys in the hash table and latitude and longitude as the value. My question is how can I read the csv file and separate the data into key and value objects to be put in the hash table?  </p>