java线程
点点点丶
这个作者很懒,什么都没留下…
展开
-
java开启新的线程的方法。。。。
看到好多博客写的有四种或者三种,我看了下Thread源码,官方注解 There are two ways to create a new thread of execution. One is to declare a class to be a subclass of <code>Thread</code>. The other way to create a th...原创 2019-11-08 19:30:40 · 146 阅读 · 0 评论 -
java为什么不建议使用String做为锁对象
public class StringSyncTest { public static void main(String[] args) { StringEx stringEx = new StringEx(); StringAThread stringAThread = new StringAThread(stringEx); strin...原创 2019-11-10 16:58:49 · 2135 阅读 · 0 评论