aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Threads" Watch "Threads" New topic
Author

Threads

Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
How do i create four threads and each thread calculating the cube root of a different number?


Do What You Wanna Be....Taking Things The Way They Come
scjp 1.6 91 percent, scmad 90 percent(rounded off to nearest integer)
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9090

There are many ways of doing it. Did you try to write some code by yourself?? Here's a structure of a program that can do it


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
ya thanks....i did it this way ? now i want to search a text file on the computer which has the four numbers...how can i do it? i dont want to store the file in the root of the web dir....
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9090

So this has become a completely different question now. If the question is about reading a file from a web application, then the SCJP forum is not the appropriate place for this question. Start a new topic in a more appropriate forum...
Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 152
sorry.....its not the web directory....i dont want to store the text file in the root directory of the application.....not the web directory...how do i search the whole computer for the text file named cube.txt?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 14606

Ankur Jain Kothari wrote:how do i search the whole computer for the text file named cube.txt?


Please show us what you did so far, and what problems you are having, and we can give you a hint in the right direction.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
IntelliJ Java IDE
 
subject: Threads
 
Threads others viewed
Thread Question: Are they all "under" creator?
For those of you who are certified ......
Thread Help Wanted
thread safe for SecureRandom.nextBytes()?
To which of the following can we apply the synchronized keyword
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture