📄 e9_1.java
字号:
public class E9_1
{
static Lefthand left; static Righthand right;
public static void main(String args[])
{
left = new Lefthand();
right = new Righthand();
left.start();
right.start();
}
}
class Lefthand extends Thread
{
public void run()
{
for(int i=0;i<=5;i++)
{ System.out.println("i am a student");
try{sleep(500);}
catch(InterruptedException e){}
}
}
}
class Righthand extends Thread
{
public void run ()
{
for(int i=0;i<=5;i++)
{System.out.println("i am oookkk");
try{sleep(300);}
catch(InterruptedException e){}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -