![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
fqwinner1
这个作者很懒,什么都没留下…
展开
-
java 的 equals 和 ==
① String s1 = "hello" String s2 = "hello" s1 == s2 s1 equals s2 ② String s1 = "hello" String s2 = new String("hello") s1 != s2 s1 equals s2 ③ String s1 = "hel原创 2012-09-08 16:31:45 · 139 阅读 · 0 评论 -
java isInterrupted 和interrupted方法区别
public boolean isInterrupted() 调用不会重置中断状态 public static boolean interrupted() 调用会重置中断状态 InterruptedException 发生后会重置中断状态原创 2012-11-25 15:41:47 · 322 阅读 · 0 评论 -
java 判断runnable对象是否被中断
用Thread.currentThread( ).isInterrupted( ) 例子: public class MyRunnable implements Runnable { public void run( ) { while (!Thread.currentThread( ).isInterrupted( )) { ...原创 2012-11-25 17:20:21 · 1280 阅读 · 0 评论