Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.function.Function;

public class Main {

    public static void main(String[] args) {

        Function<Integer, Double> centToFahrenheitInt = x -> new Double((x * 9 / 5) + 32);
        double fahrenheit = centToFahrenheitInt.apply(100);
        System.out.println("Centigrade to Fahrenheit: " + fahrenheit);
    }

}