23 lines
638 B
Java
23 lines
638 B
Java
package pr2.auffrischung.grossmacher;
|
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Grossmacher_Lambda {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
// Stream.of(args).forEach(System.out::println);
|
|
|
|
Stream.of(args)
|
|
// hier soll noch eine Split-Funktion eingesetzt werden
|
|
.map(a -> a.toUpperCase())
|
|
.forEach(System.out::print);
|
|
System.out.println();
|
|
Long counter = Stream.of(args).collect(Collectors.counting());
|
|
System.out.println("Es wurden " + counter + " Worte als Parameter "
|
|
+ "übergeben.");
|
|
}
|
|
|
|
}
|