Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.*;

public class Main {
    public static int getKeyMaxSize(Map<String, ?> map) {

        int maxLength = 0;

        for (String key : map.keySet()) {

            if (key != null && key.length() > maxLength) {

                maxLength = key.length();
            }
        }

        return maxLength;
    }
}