Two coding languages I should learn are Java, and Python.
Here is some bash script code:
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
public class States {
public static void main(String[] args) throws Exception{
// "This is the old scanner way of doing this":
Scanner sc = new Scanner(new File("states.txt"));
//List lines = FileUtils.readLines(new File("states.txt"), "UTF-8");
HashMap states = new HashMap();
while(sc.hasNextLine()) {
String line = sc.nextLine();
String[] columns = line.split(",");
String stateName = columns[0];
String abbrev = columns[1];
states.put(abbrev, stateName);
}
//The size of the HashMap is 50
//The abbreviation GA is for Georgia
System.out.println("The size of the HashMap is " + states.size());
System.out.println("The abbreviation GA is for " + states.get("GA"));
System.out.println(states.containsKey("PR"));
//What is a set?
//states.entrySet();
}
}