Can a program that inserts 25 random integers from 0 to 100 in order into a LinkedList object be made. The program should sort t

Question

Can a program that inserts 25 random integers from 0 to 100 in order into a LinkedList object be made. The program should sort the elements, and then calculate the sum of the elements and the floating point average of the elements.

For example:

 

import java.util.Collections;

import java.util.Iterator;

import java.util.LinkedList;

import java.util.Random;

 

public class ListTest3 {

  public static void main( String[] args ) {

     LinkedList< Integer > list = new LinkedList< Integer >()

 

     // Create objects to store in the List

     

     // Sort and Print the List

 

     // Calculate and print the sum and average

  }

} // end class ListTest3

Details
Purchase An Answer Below

Have a similar question?