Java Threads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thatos
    New Member
    • Aug 2007
    • 105

    Java Threads

    if I have the following class
    Code:
    public class p1 extends Threads{
     public static main void(){
      run();
      run();
     }
     static void run(){
      //Code here
     }
    
    }
    When I run the above class, will it be threaded or not, or do I have to create another class to handle threads?
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    You need to create thread like

    Code:
    Thread t_obj = new Thread();
    Regards
    Dheeraj Joshi

    Comment

    Working...