Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ main
Method
main
streams/Looping.java:9–12 ·
view source on GitHub ↗
(String[] args)
Source
from the content-addressed store, hash-verified
7
public
class
Looping {
8
static
void
hi() { System.out.println(
"Hi!"
); }
9
public
static
void
main(String[] args) {
10
repeat(3, () -> System.out.println(
"Looping!"
));
11
repeat(2, Looping::hi);
12
}
13
}
14
/* Output:
15
Looping!
Callers
nothing calls this directly
Calls
1
repeat
Method · 0.80
Tested by
no test coverage detected