The moose likes Threads and Synchronization and the fly likes A simple program of Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "A simple program of Threads" Watch "A simple program of Threads" New topic
Author

A simple program of Threads

khentallah safdar
Greenhorn

Joined: Mar 09, 2003
Posts: 1
Since i have Threads, till yet i am not able to understand the code of it. give a simple example with explaination of Threads. that i can easily understand the basics of threads....
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1109

Hi Khentallah,
Have you not read the "Threads" lesson in the "Java Tutorial"?
http://java.sun.com/docs/books/tutorial/essential/threads/index.html
Was it not clear enough for you?
Bruce Eckel's book "Thinking in Java" has a chapter on threads. It is available for download from:
http://www.mindview.net/Books/TIJ/
[I am assuming that you haven't read it.]
The "Safari" online library
http://safari.informit.com
have several books on java thread programming, including:
http://safari.informit.com/?x=1&mode=section&sortKey=title&sortOrder=asc&view=&xmlid=0-201-31009-0&open=true&catid=prog.java&s=1&b=1&f=1&t=1&c=1&u=1&page=1
and
http://safari.informit.com/?x=1&mode=section&sortKey=title&sortOrder=asc&view=&xmlid=0-672-31585-8&open=true&catid=prog.java&s=1&b=1&f=1&t=1&c=1&u=1&page=6
and
http://safari.informit.com/?x=1&mode=section&sortKey=title&sortOrder=asc&view=&xmlid=1-56592-418-5&open=true&catid=prog.java&s=1&b=1&f=1&t=1&c=1&u=1&page=6
[Again, I assume you haven't read them.]
The "JavaWorld" online magazine also has many articles on threads, including several by Jeff Friesen:
http://www.javaworld.com/javaworld/jw-05-2002/jw-0503-java101.html
[Same assumption here, too!]
And another online tutorial about threads (in java):
http://home.att.net/~baldwin.dick/Intro/Java058.htm
Hope this helps you.
Good Luck,
Avi.
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 949
The book Java Threads for $4! Now how can you beat a deal like that? I bought my copy yesterday.


Please ignore post, I have no idea what I am talking about.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Moving to the Threads forum.


"JavaRanch, where the deer and the Certified play" - David O'Meara
 
 
subject: A simple program of Threads
 
Threads others viewed
Help needed in Threads !!!!!
Tips to learn Multithreading.
Threads
threads
How does this work: int someVar = new SomeClass( argToConstructor ).aGetter() ;
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com