views:

127

answers:

5

How can I make use of parallel in Java? Or do I use normal threads?

+2  A: 
  1. Read the Java Concurrency Tutorial.
  2. Make multiple threads to do your work for you.
Travis Gockel
A: 

assuming you are looking for distributed computing, you could use frameworks like hadoop

Aadith
A: 

Java threads are the basis for parallel computing in all Java implementations that I have heard about. You can either use them 'bare' or you could see if there is a framework that does what you need. But without information about what you actually need, it is hard to give any concrete suggestions.

Stephen C
A: 

What a big topic! A typical solution is using multi-threading, you need a class implemented Runnable interface and put your function into its run() method. For details, I suggest you buy a copy of Java Concurrency in Practice.

evanmeng
A: 

You can use both Java Threads and Java Concurrency framework.

If you are really interested about Java concurrency, Java Concurrency in Practice is a good book to start.

Upul