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, String> converter = (i) -> Integer.toString(i);

        Function<String, Integer> reverse = (s) -> Integer.parseInt(s);

        System.out.println(converter.apply(3).length());
        System.out.println(converter.andThen(reverse).apply(30).byteValue());
    }
}