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

Method main

reflection/Staff.java:33–49  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

31 "Position " + title + " not available");
32 }
33 public static void main(String[] args) {
34 Staff staff = new Staff("President", "CTO",
35 "Marketing Manager", "Product Manager",
36 "Project Lead", "Software Engineer",
37 "Software Engineer", "Software Engineer",
38 "Software Engineer", "Test Engineer",
39 "Technical Writer");
40 staff.fillPosition("President",
41 new Person("Me", "Last", "The Top, Lonely At"));
42 staff.fillPosition("Project Lead",
43 new Person("Janet", "Planner", "The Burbs"));
44 if(staff.positionAvailable("Software Engineer"))
45 staff.fillPosition("Software Engineer",
46 new Person(
47 "Bob", "Coder", "Bright Light City"));
48 System.out.println(staff);
49 }
50}
51/* Output:
52[Position: President, Employee: Me Last The Top, Lonely

Callers

nothing calls this directly

Calls 2

fillPositionMethod · 0.95
positionAvailableMethod · 0.95

Tested by

no test coverage detected