listeners in Java

I have done much ActionScript3 before and it uses listeners to detect some condition. Java has been around longer so I expect this is simialr.

If I want to for example put a whole lot of data into an array in class, and then I want something to tell me when this is done in the 'main' , I use a 'lisetner'.

Hw do I code for this.
jagguyAsked:
Who is Participating?
 
Gurvinder Pal SinghConnect With a Mentor Commented:
A complete example of your requirement will take some time and effort to complete, I'm not able to get the same from internet.
Basically, you need to generate an event when array filling is finished, and add a subscriber to that event so that once that event is completed, subscriber will be notified for the same.
0
 
Gurvinder Pal SinghCommented:
You need to understand first the event handling in Java.
http://www.scoug.com/os24u/1999/scoug905.2.javaevents.html
0
 
jagguyAuthor Commented:
I really need a complete example as i didnt follow that.

just say i make a call to a procedure to fill an array with a lot of data. i want a listener to tel me when the array has finished filling
0
All Courses

From novice to tech pro — start learning today.