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

chromosomes move to the middle of the spindle during what phase
WHY IS IT IMPORTANT FOR AN IV SOLUTION TO HAVE SALT IN IT
What were the farms the Spanish operated in the Americas called?
You are going to mix a gallon bucket of window cleaner. The instructions direct you to mix 1 part cleaner to 3 parts water. How much cleaning solution will you
A skier is trying to decide whether or not to buy a season ski pass. a daily pass is $75. A season ski pass is $350. The skier would have to rent skis with eith
How did written statements help define the revolution
Can someone please describe surface tension to me. Please don't give me the dictionary definition. Thank you
Real life example of chloroplasts
ed spent 35% of his time on roller coasters. if he was there for 8 hours, how much time did he spend on roller coasters
what major rivers have their headwaters in the rockies