![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
kurt17
这个作者很懒,什么都没留下…
展开
-
JTable 清空 内容的简便方法
网上搜了几个方法,感觉不太理想,研究了一下API,发现这个方法可能是最直接,最简便的。[code=Java]for (int i = jTable.getColumnCount(); i > 0; i--) { String columnName = jTable.getColumnName(i-1); TableColumn aColumn = jTabl原创 2012-03-31 09:34:53 · 2680 阅读 · 0 评论 -
notify() and notifyAll():
notify() and notifyAll():notify() wakes up one thread and releases the lock. It is to send wake-up command to another one and only one thread that is in wait() status and is waiting for a notify原创 2013-08-04 07:47:30 · 962 阅读 · 0 评论 -
TesgLog
package util.log;import java.util.Calendar;import java.util.Date;public class TesgLog {/*** @param args*/public static void main(String[] args) {MyLogger logger = new MyLog原创 2014-05-31 10:52:14 · 749 阅读 · 0 评论 -
Mock InjectMocks ( @Mock 和 @InjectMocks )区别
之前一直对这两个注解的区别不是很明白。搜到过一篇博客园的文章举例说明了代码行为的区别。后来在stackoverflow上看到一个问答简单明了的解释了这两个注解在定义上的区别:在此翻译记录一下://译文Begin:@Mock: 创建一个Mock.@InjectMocks: 创建一个实例,其余用@Mock(或@Spy)注解创建的mock将被注入到用该实例中。注意:必须使用@翻译 2016-09-26 15:32:14 · 43106 阅读 · 0 评论