Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.LinkedHashSet;

import java.util.Set;

public class Main {
    public static <V> Set<V> newLinkedHashSet(int expectedSize) {
        return new LinkedHashSet<V>(expectedSizeToCapacity(expectedSize));
    }

    private static int expectedSizeToCapacity(int expectedSize) {
        return 4 * expectedSize / 3 + 1;
    }
}