(String[] args)
| 28 | public void foam() { append(" foam()"); } |
| 29 | // Test the new class: |
| 30 | public static void main(String[] args) { |
| 31 | Detergent x = new Detergent(); |
| 32 | x.dilute(); |
| 33 | x.apply(); |
| 34 | x.scrub(); |
| 35 | x.foam(); |
| 36 | System.out.println(x); |
| 37 | System.out.println("Testing base class:"); |
| 38 | Cleanser.main(args); |
| 39 | } |
| 40 | } |
| 41 | /* Output: |
| 42 | Cleanser dilute() apply() Detergent.scrub() scrub() |