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 Double calculateMagnitude(Map<Object, Integer> map1) {
        Double sum = 0.0;
        for (Integer value : map1.values()) {
            sum += Math.pow(value, 2);
        }

        return Math.sqrt(sum);
    }
}