What is Multithreading and how to create a Thread in java

preview_player
Показать описание
What is Multithreading and how to create a Thread in java
Рекомендации по теме
Комментарии
Автор

You have explained in a very simple manner sir.

1st way:
package MultiThread;

public class Extendsway extends Thread{

public void run() {
System.out.println("basics of java");
}

public static void main(String[] args) {

Extendsway kim=new Extendsway();

kim.start();

}

}



2nd Way:

package MultiThread;

public class Runnableinterface implements Runnable {


public void run() {

Runnable interface");
}

public static void main(String[] args) {

Thread tin=new Thread(new Runnableinterface());
tin.start();



}

}

santhoshp
Автор

Can you tell what is the use of parameterized constructor in model(entity) class ?

piyushsaini
join shbcf.ru