The driving force behind asynchronous I/O is to allow the program to continue to do....
Do we have Asynchronous I/O? in JAVA?What you want, no matter what you call it, is what ejp suggested: concurrent IO with threads. I believe that if you do your IO in its own thread, it shouldn't interfere with keyboard or mouse.
How do you use "Lock" in JAVA?Say we have a variable in class that shares between two threads,How threads lock it?Have a look at the Thread class and especially at the keyword "synchronized". Paraphrased from "Just Java 2": In Java, thread mutual exclusion is built on objects. Every object in the system has its own semaphore, so any object in the system can be used as the "turnstile" or "thread serializer" for threads. You use the synchronized[i] keyword and explicitly or implicitly provide an object, any object, to synchronize on.