I need to create an asynchronous method in java. I thought about using two threads and a queue similar to C++ so I can push the method to the queue in one thread. And another thread reads the method executes it and then call the handler method. Is that possible in java ? any sample code will be appreciated ?