Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.HashMap;
import java.util.Iterator;

public class Main {
    public static Object keyString(HashMap<String, String> map, String o) {
        Iterator<String> it = map.keySet().iterator();
        while (it.hasNext()) {
            Object keyString = it.next();
            if (map.get(keyString).equals(o))
                return keyString;
        }
        return null;
    }
}