CSIT121/821 Lab Exercises
CSIT121/821 Lab ExercisesLab 6Deadline: 8 Nov 2020, 10 PMObjectives• Familiar with Lambda, Stream and Recursive.Use Lambda and Stream to convert Q1 and Q2.Q1 (1 Mark):int[] values=12,2,9,8,4,65,7,4,2,66,88,11,33,44,55;double result = 0;for(int e : values) result = result +e; result=result/values.length;Q2 (1 Mark):Integer[] values=12,2,9,8,4,65,7,4,2,66,88,11,33,44,55;Set<Integer> a = new TreeSet<>(Arrays.asList(values));for(int e : a) System.out.println(e); Q3: Write the following code and use […]
CSIT121/821 Lab Exercises Read More »