// // Test List2 // import java.util.Scanner; public class TestList2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); List2 z = new List2(); String n, dummy; int s; while(input.hasNext()) { n = input.nextLine(); s = input.nextInt(); dummy = input.nextLine(); // consume "\n" z.insert(n, s); } z.print(); double avg = z.average(); System.out.println("Average = " + avg); } }