Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/BruceEckel/OnJava8-Examples
/ command
Method
command
staticchecking/petspeak/PetSpeak.java:26–26 ·
view source on GitHub ↗
(Pet p)
Source
from the content-addressed store, hash-verified
24
25
public
class
PetSpeak {
26
static
void
command(Pet p) { p.speak(); }
27
public
static
void
main(String[] args) {
28
Pet[] pets = {
new
Cat(),
new
Dog() };
29
for
(Pet pet : pets)
Callers
1
main
Method · 0.95
Calls
1
speak
Method · 0.65
Tested by
no test coverage detected