-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
30 lines (24 loc) · 768 Bytes
/
HelloWorld.java
File metadata and controls
30 lines (24 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.Arrays;
import java.util.List;
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
// int[] data = new int[] {1, 2, 3};
List<Integer> data = Arrays.asList(1, 2, 3);
// cumulativeAverage(data);
}
public static void cumulativeAverage(int[] data){
// double[] averages = new double[data.length];
// int n = 0;
// int total = 0;
// double average = 0;
// for(int value:data){
// n+=1;
// total+=value;
// average=((double)total)/n;
// averages.add(average);
// System.out.println("Average: " + average);
// }
}
}