diff --git a/core-java-modules/core-java-security/src/main/java/com/baeldung/folding/Main.java b/core-java-modules/core-java-security/src/main/java/com/baeldung/folding/Main.java new file mode 100644 index 0000000000..47ae11c80c --- /dev/null +++ b/core-java-modules/core-java-security/src/main/java/com/baeldung/folding/Main.java @@ -0,0 +1,21 @@ +package com.baeldung.folding; + +import java.util.stream.IntStream; + +public class Main { + public static void main(String... arg) { + final String key = "Java language"; + + toAsciiCodes(key).forEach(c -> System.out.println(c)); + // toAsciiCodes(key).reduce(new ArrayList(), (accum, i) -> i); + // List numbers = Arrays.asList(1, 2, 3, 4, 5, 6); + // numbers.stream() + // .reduce(new ArrayList(), (k, v) -> new ArrayList()); + // System.out.println(result); + } + + public static IntStream toAsciiCodes(String key) { + return key.chars(); + } + +}