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<String, Integer> stringToInt = x -> new Integer(x);

        int i = stringToInt.apply("1");
        System.out.println("String to integer: " + i);
    }

}