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

Class Cleanser

reuse/Detergent.java:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5// Inheritance syntax & properties
6
7class Cleanser {
8 private String s = "Cleanser";
9 public void append(String a) { s += a; }
10 public void dilute() { append(" dilute()"); }
11 public void apply() { append(" apply()"); }
12 public void scrub() { append(" scrub()"); }
13 @Override public String toString() { return s; }
14 public static void main(String[] args) {
15 Cleanser x = new Cleanser();
16 x.dilute(); x.apply(); x.scrub();
17 System.out.println(x);
18 }
19}
20
21public class Detergent extends Cleanser {
22 // Change a method:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected