Results 1 to 4 of 4
  1. #1
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    450
    Rep Power
    6

    Default is it possible to write program with out thread

    hi
    i am newer to java.

    can u tell why we have to use threads to our program.

    is it possible to write program with out thread>
    .................................................. ...

    regards
    mak.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    We use threads in Java(actually in whole programming) to execute parallel or distributed process at the same time.

    More simply, think about a users data entry system. Once a user enter his/her data system need to process it. It may take little time. Until that process is completed system cannot get others data, if you are working on a single routine. Using multiple threads what we can do is, collecting data and processing data can be done in two phrase, without disturbing to each other.

    You cannot write programming without using threads in Java. Even you implement runnable interface or extended the Thread class, main method always run on a thread.

  3. #3
    peter_lawrey is offline Member
    Join Date
    Mar 2008
    Posts
    10
    Rep Power
    0

    Default

    > is it possible to write program with out thread.
    You can *write* a program without threads
    however you cannot run a program without using threads.

    Fortunately, you can write and run programs without worrying about threads being there. You can get a long way without using Threads explicitly.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. How to write interceptor program in struts2?
    By vasu in forum Web Frameworks
    Replies: 1
    Last Post: 10-07-2008, 08:53 AM
  2. need help to write Program in JAVA
    By maneibr in forum New To Java
    Replies: 1
    Last Post: 03-13-2008, 02:28 PM
  3. Replies: 1
    Last Post: 02-15-2008, 05:07 PM
  4. Replies: 2
    Last Post: 08-07-2007, 08:22 PM
  5. Replies: 1
    Last Post: 07-27-2007, 06:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •