Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/BruceEckel/OnJava8-Examples
/ main
Method
main
reflection/PetCounter.java:54–56 ·
view source on GitHub ↗
(String[] args)
Source
from the content-addressed store, hash-verified
52
System.out.println(counter);
53
}
54
public
static
void
main(String[] args) {
55
new
PetCounter().count(
new
ForNamePetCreator());
56
}
57
}
58
/* Output:
59
Rat Manx Cymric Mutt Pug Cymric Pug Manx Cymric Rat
Callers
nothing calls this directly
Calls
1
count
Method · 0.45
Tested by
no test coverage detected