Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- private B; //B is now A's responsibility THROUGH ITS LIFETIME
- public A() {
- B = new B();
- Transform();
- }
- void Transform() {
- //Do work on B ONCE
- }
- }
- class B {
- // B has some fields of primitive types
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement