Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: hi awl

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hi awl

    i m students
    i hope i will get here guidance frm experts.

  2. #2
    Junior Member
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: hi awl

    sme error in dis programme


    class NewThread extends Thread
    {
    NewThread()
    {
    super("demo thread:");
    System.out.println("child Thread:"+this);
    start();
    }

    public void van()
    {
    try
    {
    for(int i=5;i>0;i--)
    {
    System.out.println("child Thread:"+i);
    Thread.sleep(500);
    }
    }

    catch(InterruptedException e)
    {
    System.out.println("child Thread");
    }
    System.out.println("exiting child");
    }
    }

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 287 Times in 225 Posts
    Blog Entries
    4

    Default Re: hi awl

    Hello ashwinp.

    Welcome to the forums.

    Please post your Java problems in the correct forum with a descriptive title. It will help get answers quicker. Thanks.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

    Looking for a Java job? Visit - Java Programming Careers

  4. #4
    Junior Member
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: hi awl

     
    class NewThread extends Thread1
    {
    	NewThread()
    	{
    		super("demo thread:");
    		System.out.println("child Thread:"+this);
    		start();
    	}
     
    	public void van()
    	{
    		try
    		{
    			for(int i=5;i>0;i--)
    			{
    				System.out.println("child Thread:"+i);
    				Thread.sleep(500);
    			}
    		}
     
    		catch(InterruptedException e)
    		{
    			System.out.println("child Thread");
    		}
    		System.out.println("exiting child");
    	}
    }
     
    class Three
    {
    	public static void main(String str[])
    	{
    		new Thread();
    		try
    		{
    			for (int i=5;i>0;i--)
    			{
    				System.out.println("main Thread:"+i);
    				Thread.sleep(1000);
    			}
    		}
    		catch(interruptedException e)
    		{
    			System.out.println("main Thread......");
    		}
    		System.out.println("exiting Thread");
    	}
    }