`
niwtsew
  • 浏览: 68675 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
import junit.framework.TestCase; import junit.framework.Assert; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.lang.reflect.Constructor; public class TestReflectionGetFields extends TestCase {     public void testGetFieldsWillReturnOnlyPublicField ()     {     ...
java.lang.StringBuffer:  thread-safe(之所以是thread-safe的是因为它的所有方法(构造函数除外)都是synchronized的) java.lang.StringBuilder: not thread-safe, much faster than StringBuffer since no synchronization. StringBuilder was introduced since JDK1.5 and it provides the same operation as StringBuffer. AbstractStringBuilde ...
Explainations of Thread.State:         /**          * Thread state for a thread which has not yet started.          */         NEW,                 /**          * Thread state for a runnable thread.  A thread in the runnable          * state is executing in the Java virtual machine but it may        ...
import junit.framework.TestCase; import junit.framework.Assert; public class TestStringIdentical extends TestCase { public void testTwoConstantStringAreTheSame() {   Assert.assertSame("hi", "hi"); } public void testConstantStringIsTheSameAsItsReference() {   String refere ...
Global site tag (gtag.js) - Google Analytics