deborahsalinas3526 deborahsalinas3526
  • 25-02-2020
  • Computers and Technology
contestada

You have an int array named examScores that is 1000 elements in length. Provide a single line of code that would sort the examScores. (Note: You do not need to provide the import statements supporting the line of code)

Respuesta :

ijeggs
ijeggs ijeggs
  • 25-02-2020

Answer:

Arrays.sort(examScores);

Explanation:

The line of code above will sor the array using the sort method from the java.util.Arrays.

The complete java code showing the importation of the class as well as creating the array examScores[] with 1000 elements is shown below:

import java.util.Arrays;

public class num5 {

   public static void main(String[] args) {

     int [] examScores = new int[1000];

       Arrays.sort(examScores);

   }

}

Answer Link

Otras preguntas

''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini
''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini
whats the most accurate estimation of 65+77
which of the following represents the most accurate estimation of 38+23
''Life in a city is more rewarding than life outside a city."List two or three arguments in favor of this opinion and two or three arguments opposing this opini
whats the most accurate estimation of 65+77
A pencil measures 14 cm long. How many millimeters long is it?
which of the following represents the most accurate estimation of 38+23
which of the following represents the most accurate estimation of 38+23
A pencil measures 14 cm long. How many millimeters long is it?