Create a package for the article code

This commit is contained in:
Andrew Shcherbakov 2019-06-12 07:18:14 +02:00
parent 01492d1674
commit 2449c8117a
1 changed files with 21 additions and 0 deletions

View File

@ -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<Integer>(), (accum, i) -> i);
// List<Integer> numbers = Arrays.asList(1, 2, 3, 4, 5, 6);
// numbers.stream()
// .reduce(new ArrayList<Integer>(), (k, v) -> new ArrayList<Integer>());
// System.out.println(result);
}
public static IntStream toAsciiCodes(String key) {
return key.chars();
}
}