Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.util.Log;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Main {
    private static final String TAG = "CollectionUtil";

    public static void printMapBySet(Map map) {
        Set<String> ketSet = map.keySet();
        Iterator<String> iterator = ketSet.iterator();
        while (iterator.hasNext()) {
            String key = iterator.next();
            String value = (String) map.get(key);
            Log.i(TAG, "----key = " + key + ",value = " + value);
        }

    }
}