Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
a5238353
Commit
a5238353
authored
Sep 09, 2018
by
季圣华
Browse files
增加测试类
parent
12060b7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/com/jsh/test/MyRunnable.java
0 → 100644
View file @
a5238353
package
com.jsh.test
;
public
class
MyRunnable
implements
Runnable
{
//实现Runnable接口
public
void
run
(){
for
(
int
i
=
0
;
i
<
30
;
i
++){
System
.
out
.
println
(
Thread
.
currentThread
().
getName
()+
"运行, "
+
i
);
//获取当前线程的名称
}
}
}
\ No newline at end of file
src/test/java/com/jsh/test/MyThread.java
0 → 100644
View file @
a5238353
package
com.jsh.test
;
public
class
MyThread
{
public
static
void
main
(
String
[]
args
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
MyRunnable
mt
=
new
MyRunnable
();
//定义Runnable子类对象
new
Thread
(
mt
,
"第"
+
i
+
"个线程"
).
start
();
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment