How handle thread

i am using two methods. one is send method to send message and another one is receive method to receive message.if i am typeing message that time i want check if any message is receive or not.If any receive i want to display that receive.
[245 byte] By [Mani_csa] at [2007-10-3 2:59:36]
# 1

> i am using two methods. one is send method to send

> message and another one is receive method to receive

> message. if i am typeing message that time i want

> check if any message is receive or not.If any receive

> i want to display that receive.

Then have the recipient send you a message that he got yours. What does it have to do with threads?

CeciNEstPasUnProgrammeura at 2007-7-14 20:49:12 > top of Java-index,Java Essentials,Java Programming...
# 2
while i am typeing currend thread is run.i have set higher priority to receive message.so while i am typeing message one thread listen receive message.how can i do this
Mani_csa at 2007-7-14 20:49:12 > top of Java-index,Java Essentials,Java Programming...
# 3
Do what?
CeciNEstPasUnProgrammeura at 2007-7-14 20:49:12 > top of Java-index,Java Essentials,Java Programming...
# 4
thread is listening the receiver method.That time i can't type the message.i want to call these methods concurrently.
Mani_csa at 2007-7-14 20:49:12 > top of Java-index,Java Essentials,Java Programming...
# 5

> thread is listening the receiver method.That time i

> can't type the message.i want to call these methods

> concurrently.

Then do it. Why can't you type a message? Where do you type it?

Either read this: http://java.sun.com/docs/books/tutorial/essential/concurrency/

or write a better and more specific problem description and show us what you're doing. Preferably the former.

CeciNEstPasUnProgrammeura at 2007-7-14 20:49:12 > top of Java-index,Java Essentials,Java Programming...