
J2SE
文章平均质量分 73
westwin
这个作者很懒,什么都没留下…
展开
-
(原创)判断字符串是不是GB2312?
对于gb2312来讲,首字节码位从0×81至0×FE,尾字节码位分别是0×40至0×FE,所以 : public boolean isGB2312(String str){ char[] chars=str.toCharArray(); boolean isGB2312=false; for(int i=0;i byte[] bytes=(""+chars[i]).g原创 2005-01-14 16:21:00 · 2623 阅读 · 3 评论 -
(转贴)checked exception VS unchecked exception
Java语言中两种异常的差别eugene 翻译 来源:Yesky Java提供了两类主要的异常:runtime exception和checked exception。所有的checked exception是从java.lang.Exception类衍生出来的,而runtime exception则是从java.lang.RuntimeException或java.lang.Error类衍生出转载 2005-06-18 17:58:00 · 1197 阅读 · 0 评论 -
(转贴)Runtime.exec()的陷阱
When Runtime.exec() wont Navigate yourself around pitfalls related to the Runtime.exec() method Summary-->转载 2005-04-22 14:00:00 · 8096 阅读 · 2 评论 -
Understand Java Thread state
Explainations of Thread.State: /** * Thread state for a thread which has not yet started. */ NEW, /** * Thread原创 2009-10-12 15:21:00 · 2859 阅读 · 0 评论 -
Understand Java String Identity
import junit.framework.TestCase;import junit.framework.Assert;public class TestStringIdentical extends TestCase { public void testTwoConstantStringAreTheSame() { Assert.assertSame("hi", "hi"); }原创 2009-10-13 17:47:00 · 887 阅读 · 1 评论