Import javax. sound. sampled. port; </P> <p> interface person <br/>{< br/> Public void sayhello (); <br/>}</P> <p> class student implements person <br/>{< br/> Public void sayhello () <br/>{< br/> system. out. println ("say hello to everyone"); <br/>}</P> <p> // use static proxy, the biggest problem, the proxy class can only be an interface service, but the scalability is not good <br/> class proxyperson implements person <br/>{< br/> private person per; </P> <p> Public proxyperson (person per) <br/> {<br/> This. per = per; <br/>}</P> <p> Public void sayhello () <br/>{< br/> system. out. println ("Say hello, first let the principal say two sentences"); <br/> This. per. sayhello (); <br/> system. out. println ("say hello and then let the principal stink a few times "); <br/>}</P> <p> public class test <br/> {<br/> Public static void main (string [] ARGs) <br/>{< br/> person per = new proxyperson (new student (); <br/> Per. sayhello (); <br/>}< br/>}