Thread View: borland.public.jbuilder.java.language
2 messages
2 total messages
Started by George
Fri, 12 Aug 2005 16:50
synchronized methods
Author: George
Date: Fri, 12 Aug 2005 16:50
Date: Fri, 12 Aug 2005 16:50
11 lines
1163 bytes
1163 bytes
If an interface method is declared as
public void actionPerformed(ActionEvent e)
and I implement is as
public synchronized void actionPerformed(ActionEvent e)
I don't get any compile errors. Does this mean that two (or more) users can
never perform the action at the same time?
TIA
George
Re: synchronized methods
Author: Alexey N. Solofnenko
Date: Fri, 12 Aug 2005 17:18
Date: Fri, 12 Aug 2005 17:18
22 lines
1501 bytes
1501 bytes
http://java.sun.com/docs/books/tutorial/essential/threads/monitors.html
- Alexey.
George wrote:
> If an interface method is declared as
> public void actionPerformed(ActionEvent e)
>
> and I implement is as
> public synchronized void actionPerformed(ActionEvent e)
>
> I don't get any compile errors. Does this mean that two (or more) users can
> never perform the action at the same time?
>
> TIA
> George
>
>
--
Alexey N. Solofnenko {trelony at gmail.com}
home: http://trelony.cjb.net/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads