Creating a double array (one row for states, and one for capitols), I am trying to use 'map.put' in a for loop to save the arrays 'key(states)' and 'value(capitols)' to the HashMap. When using a key from user input after assigning a new HashMap (hMap = getInfo();, My output returns "null". Im not quite sure what it is im doing wrong, but I have a feeling I made an error in the for loop.
public class HashMapProgram {
    public static void main (String[]args) {
        Scanner input = new Scanner(System.in);
        //Assign contents of map in getInfo to hMap
        HashMap<String, String> hMap = getInfo();
        //Prompting user to input a state (key)
            System.out.print("Enter a state, or \"done\" when finished: ");
            String state = input.next();
        if(hMap.get(state) != "done")
                System.out.println("The capital is "+ hMap.get(state));
    }
    public static HashMap<String, String> getInfo(){
        //HashMap to save contents in
        HashMap<String, String> map = new HashMap<>();
        String x[][] = {
                {"Alabama","Alaska","Arizona"  ,"Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia",
                "Hawaii"  ,"Idaho" ,"Illinois" ,"Indiana" ,"Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland",
                "Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey",
                "New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania",  "Rhode Island", "South Carolina",
                "South Dakota", "Tennessee",    "Texas",    "Utah", "Vermont",  "Virginia", "Washington","West Virginia","Wisconsin","Wyoming"},
                {"Montgomery","Juneau","Phoenix","Little Rock","Sacramento","Denver","Hartford","Dover","Tallahassee","Atlanta",
                "Honolulu","Boise","Springfield","Indianapolis","Des Moines","Topeka","Frankfort","Baton Rouge","Augusta", "Annapolis",
                "Boston","Lansing","St. Paul","Jackson","Jefferson City","Helena","Lincoln","Carson City","Concord","Trenton",
                "Santa Fe","Albany","Raleigh","Bismarck","Columbus","Oklahoma City","Salem","Harrisburg","Providence","Columbia",
                "Pierre","Nashville","Austin","Salt Lake City","Montpelier","Richmond","Olympia","Charleston","Madison","Cheyenne"}
        };
        //Saving contents in 'map'
        for(int i = 0; i < x.length; i++) {     
            map.put(x[0][i], x[1][i]);  
        }
        return map;
    }
}
 
     
    