logo

Crowdly

Browser

Add to Chrome

Teniendo el siguiente código incluido en una función main, al ejecutarlo resulta...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Teniendo el siguiente código incluido en una función main, al ejecutarlo resultará (seleccione la respuesta correcta):

CompletableFuture<List<Integer>> prevCS = new CompletableFuture<>();

        prevCS.supplyAsync(() -> {

                    List<Integer> list = List.of(1,2,3,4,5);

                    List<Integer> squared = new ArrayList<>();

                    for(Integer element:list){ squared.add((int) Math.pow(element,2));}

                    return squared;

        })

                .thenAccept(()->{

                    System.out.println(squared);

                });

0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.upm.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome