summaryrefslogtreecommitdiff
path: root/Year_2/SE/L21_ex2
diff options
context:
space:
mode:
Diffstat (limited to 'Year_2/SE/L21_ex2')
-rw-r--r--Year_2/SE/L21_ex2/Main.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/Year_2/SE/L21_ex2/Main.java b/Year_2/SE/L21_ex2/Main.java
new file mode 100644
index 0000000..6f077f9
--- /dev/null
+++ b/Year_2/SE/L21_ex2/Main.java
@@ -0,0 +1,11 @@
+import java.util.List;
+
+public class Main {
+ public static void main(String[] args) {
+ List<String> l = List.of("to", "speak", "the", "truth", "and", "pay", "your", "debts");
+ l.stream()
+ .map(x -> x.charAt(0))
+ .forEach(c -> System.out.print(c));
+ }
+}
+