Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Map;

public class Main {
    private static String getStringOfClassList(Map<String, Integer> classes) {
        String result = "";
        for (String className : classes.keySet()) {
            Integer occurences = classes.get(className);
            if (!result.isEmpty())
                result += ", ";
            result += className + ": " + occurences;
        }

        return result;

    }
}