public class Doubler{ public static int doubleMe(Holder h){ return h.getAmount()*2; }} and: public class Holder{ int amount=10; public void doubleAmount() { amount=Doubler.doubleMe(this); } public void getAmount(){ return amount; } // more Code}
public class Doubler{ public static int doubleMe( [PLACE HERE] h){ return [PLACE HERE]*2; }}public class Holder{ int amount =10; public void doubleAmount(){ amount= Doubler.doubleMe([PLACE HERE]); } public int getAmount(){return amount;}; /*more code*/}