Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigDecimal;
import java.util.stream.Stream;

public class Main {

    public static void main(String[] args) throws Exception {

        Stream.of(new BigDecimal("1.2"), new BigDecimal("3.7")).mapToDouble(BigDecimal::doubleValue).average()
                .ifPresent(System.out::println);
    }
}