multi thread execution - How to speed up applications using threads in java