The thread source __java in Java is related

Source: Internet
Author: User
/**
* Constructs a new {@code Thread} with no {@code Runnable} object and a
* Newly generated name. The new {@code Thread} would belong to the same
* {@code Threadgroup} as the {@code Thread} calling this constructor.
*
* @see Java.lang.ThreadGroup
* @see java.lang.Runnable
*/
Public Thread () {
Create (NULL, NULL, NULL, 0);
}

/**
* Constructs a new {@code Thread} with a {@code Runnable} object and a
* Newly generated name. The new {@code Thread} would belong to the same
* {@code Threadgroup} as the {@code Thread} calling this constructor.
*
* @param runnable
* A {@code Runnable} whose method <code>run</code> would be
* Executed by the new {@code Thread}
*
* @see Java.lang.ThreadGroup
* @see java.lang.Runnable
*/
Public Thread (Runnable Runnable) {
Create (NULL, runnable, NULL, 0);
}

/**
* Constructs a new {@code Thread} with a {@code Runnable} object and Name
* provided. The new {@code Thread} would belong to the same {@code
* Threadgroup} as the {@code Thread} calling this constructor.
*
* @param runnable
* A {@code Runnable} whose method <code>run</code> would be
* Executed by the new {@code Thread}
* @param threadname
* The name for the {@code Thread} being created
*
* @see Java.lang.ThreadGroup
* @see java.lang.Runnable
*/
Public Thread (Runnable Runnable, String threadname) {
if (ThreadName = = null) {
throw new NullPointerException ();
}

Create (null, runnable, threadname, 0);
}

/**
* Constructs a new {@code Thread} with no {@code Runnable} object and the
* Name provided. The new {@code Thread} would belong to the same {@code
* Threadgroup} as the {@code Thread} calling this constructor.
*
* @param threadname
* The name for the {@code Thread} being created
*
* @see Java.lang.ThreadGroup
* @see java.lang.Runnable
*
*/
Public Thread (String threadname) {
if (ThreadName = = null) {
throw new NullPointerException ();
}

Create (NULL, NULL, ThreadName, 0);

}







Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.