Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Arrays;
import java.util.stream.Stream;

public class Main {
    public static void main(String[] args) {
        // collect as typed array
        Stream<String> words = Stream.of("All", "men", "are", "created", "equal");
        final String[] wordsArray = words.toArray(String[]::new);
        Arrays.asList(wordsArray).forEach(n -> System.out.println(n));
    }
}