Respuesta :

Answer:

Explanation:

The code below was coded in Java. It uses a loop to read 7 input integers and saves each one in an ArrayList called myList. Then it uses the Arrays built-in Java class to print out all the values in the arraylist. The code is tested and the output can be seen in the attached image below.

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       ArrayList<Integer> myList = new ArrayList<>();

       for (int i = 0; i< 7; i++) {

           int num = in.nextInt();

           myList.add(num);

       }

      System.out.println(Arrays.toString(myList.toArray()));

   }

}

Ver imagen sandlee09