The difference between "extend" and " implements' is :

A class can extend the functionality of the super class,
    Here the super class, will already have some methods defined and
functionality implemented witin them,
    so in your sub class you can add some more function.

A class has to implement the functionality of the super class

   Here the super class will have only the signature of the method but
does not define how the class behaves, it is felt to the sub class
which implements this class.


Hope you understood, having this knowledge you can apply it to your example.





On Thu, Feb 19, 2009 at 9:47 AM, Tanya Dina Ruttenberg
<[email protected]> wrote:
> What is the difference between extends and implements as in
>
> public class SimpleBeanJLabel extends JLabel
>     implements Serializable {
> }
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to