Thread: Interfaces
View Single Post
Old Jan 7th, 2008, 9:29 PM   #7
null_ptr0
12 years old
 
Join Date: Nov 2007
Posts: 94
Rep Power: 1 null_ptr0 is on a distinguished road
Re: Interfaces

Quote:
Originally Posted by titaniumdecoy View Post
Care to explain?
When you have a callback, in c++ event handling, you pass a function ptr so it calls it each time when an event occurs.
In java, there are no function ptrs.
So, we use interfaces with a method like eventCallback(Event e) that each sub/class has to implement and just call that method.
null_ptr0 is offline   Reply With Quote