@SpringBootApplication
public class DemoApplication implements CommandLineRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
@Override
public void run(String... args) throws Exception {
List<String> palavras = Arrays.asList("java", "stream", "lambda");
palavras.stream()
.map(String::toUpperCase)
.collect(Collectors.toList())
.forEach(System.out::println);