Don't worry It's because your MyEventListenerImpl implements the interface MyEventListenerInterface. So you can say your MyEventListenerImpl is a sort of MyEventListenerInterface.
I hope this helped. Please let me know if you need more explanation. Best regards -----Mensaje original----- De: [email protected] [mailto:[email protected]] En nombre de CK Enviado el: miércoles, 15 de abril de 2009 8:15 Para: Free Java Programming Online Training Course By Sang Shin Asunto: [java programming] lab1021 - JavaBeans: exercise 4.2 Hi Class, Sorry for my lack behind post. I just have a short question as per my Subject. In MyEventSource.java, it takes Interface as variable. this make me confused. ... public void addMyEventListener(MyEventListenerInterface l) { a1.add(l); } Also, MyEventExample passes MyEventListenerImpl instead. ... s1.addMyEventListener( new MyEventListenerImpl() ); I know it runs successfully but I'm just not clear with it. If there're any post already discuss on this thing, I'm sorry but I can't find it. Any suggestion would be appreciate, CK __________ Information from ESET Smart Security, version of virus signature database 4010 (20090415) __________ The message was checked by ESET Smart Security. http://www.eset.com __________ Information from ESET Smart Security, version of virus signature database 4010 (20090415) __________ The message was checked by ESET Smart Security. http://www.eset.com __________ Information from ESET Smart Security, version of virus signature database 4010 (20090415) __________ The message was checked by ESET Smart Security. http://www.eset.com --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
