Select the only true option of compilation and running the code.

public class MyThread extends Thread {
    public static void main(String[] args) {
        new MyThread().start();
Starting a new thread executes the code that is located in the method run(). MyThread class inherits from the Thread class the empty method run() - so a new thread will bring nothing and just completes its work, and after the whole application will finish its work.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по Java
Зарегистрируйся сейчас
или Подпишись на будущие тесты