📄 testthread.java
字号:
package test.thread;public class TestThread { public static void main(String[] args) { // TODO Auto-generated method stub Thread t = new MyThread(); //t.start(); // t = new Thread(new MyThread2()); //Thread t = new MyThread2(); t.start(); for(int i=1;i<27;i++){ System.out.print(Thread.currentThread()); System.out.println("-----" + i); } }}class MyThread extends Thread{ private Object c; public void run(){ for( char c='a'; c<='z'; c++);{ System.out.print(Thread.currentThread()); System.out.println("------"+ c); } }}abstract class MyThread2 implements Runnable{ private Object c; public void run(){ for( char c='A'; c<='Z'; c++);{ System.out.print(Thread.currentThread()); System.out.println("------"+ c); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -