MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

collections/SimpleCollection.java:8–14  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

6
7public class SimpleCollection {
8 public static void main(String[] args) {
9 Collection<Integer> c = new ArrayList<>();
10 for(int i = 0; i < 10; i++)
11 c.add(i); // Autoboxing
12 for(Integer i : c)
13 System.out.print(i + ", ");
14 }
15}
16/* Output:
170, 1, 2, 3, 4, 5, 6, 7, 8, 9,

Callers

nothing calls this directly

Calls 2

printMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected