Skip to content

Commit 1abfe2b

Browse files
authored
ask of the Father in my name, he may give it to u
You didn't choose me, but I chose you, and appointed you, that you should go and bear fruit, and that your fruit should remain; that whatever you will ask of the Father in my name, he may give it to you. (John 15:16)
1 parent 31c6172 commit 1abfe2b

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

task16/task1601/Solution.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
2+
//You didn't choose me, but I chose you, and appointed you, that you should go and bear fruit,
3+
//and that your fruit should remain; that whatever you will ask of the Father in my name, he may give it to you. (John 15:16)
4+
5+
package com.javarush.task.task16.task1601;
6+
7+
/*
8+
My first thread
9+
*/
10+
11+
public class Solution {
12+
public static void main(String[] args) {
13+
TestThread task = new TestThread();
14+
new Thread(task).start();
15+
}
16+
17+
public static class TestThread implements Runnable {
18+
public void run() {System.out.println("My first thread");}
19+
}
20+
}
21+
22+
23+
/*
24+
My first thread
25+
Создать public static class TestThread — нить с интерфейсом Runnable.
26+
TestThread должен выводить в консоль «My first thread«.
27+
28+
29+
Требования:
30+
1. Добавь в класс Solution публичный статический класс TestThread.
31+
2. Класс TestThread должен реализовывать интерфейс Runnable.
32+
3. Метод run класса TestThread должен выводить "My first thread".
33+
4. Программа должна вывести "My first thread".
34+
5. Метод main не изменять.
35+
36+
37+
package com.javarush.task.task16.task1601;
38+
39+
/*
40+
My first thread
41+
*/
42+
43+
public class Solution {
44+
public static void main(String[] args) {
45+
TestThread task = new TestThread();
46+
new Thread(task).start();
47+
}
48+
}
49+
50+
*/

0 commit comments

Comments
 (0)