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


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Threads" Watch "Threads" New topic
Author

Threads

Ankur Jain Kothari
Ranch Hand

Joined: Feb 08, 2010
Posts: 154
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: 9189
    
    2

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: 154
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: 9189
    
    2

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: 154
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: 16695
    
  19

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)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Threads
 
Similar Threads
For those of you who are certified ......
thread safe for SecureRandom.nextBytes()?
Thread Question: Are they all "under" creator?
Thread Help Wanted
To which of the following can we apply the synchronized keyword