Search:

Type: Posts; User: copeg

Search: Search took 0.19 seconds.

  1. Replies
    9
    Views
    3,006

    Re: Can't understand why Interfaces are there

    No...that function defines the interface, but you can't add the method, you must add a class that implements ActionListener - you must tell the compiler there is an ActionListener throughimplements...
  2. Replies
    9
    Views
    3,006

    Re: Can't understand why Interfaces are there

    What doesn't make sense? If it were based upon classes: one can only use instances of that class. Based upon interfaces: ANY object can be a listener. Like I said its not an easy concept to wrap...
  3. Replies
    9
    Views
    3,006

    Re: Can't understand why Interfaces are there

    Any behavior defined by a class/implementation that requires an interface cannot be done without the interface implementation. Using my example above, you cannot add an action listener to listen for...
  4. Replies
    9
    Views
    3,006

    Re: Can't understand why Interfaces are there

    IMO interfaces are one of the most powerful (and beautiful) features of java, but also can be the hardest to wrap one's head around. It allows a programmer many things from multiple inheritance to...
Results 1 to 4 of 4