博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 8 ··· 12 下一页

2014年4月19日

摘要: package com.karl.test;import java.math.BigDecimal;public class Arith { private static final int DEF_DIV_SCALE = 10; private Arith() { } pu... 阅读全文

posted @ 2014-04-19 23:34 钟悍 阅读(5882) 评论(0) 推荐(0) 编辑

摘要: 1, subtring在JDK6中:String是有字符数组组成的,在JDK6中,String 类包含3个属性,char value[], int offset, int count. 它们被用作存储真正的字符数组,数组的第一个索引,String中字符的个数。当调用substring()方法时,将创... 阅读全文

posted @ 2014-04-19 23:20 钟悍 阅读(845) 评论(0) 推荐(0) 编辑

摘要: 本文翻译自:http://www.programcreek.com/2013/04/why-string-is-immutable-in-java/这是一个很老但很流行的问题,这里有几个原因String在java中被设计成immutable的。对内存、同步、数据结构等有好的理解,能更好的回答这个问题... 阅读全文

posted @ 2014-04-19 23:01 钟悍 阅读(6136) 评论(0) 推荐(0) 编辑

2014年3月26日

摘要: 问题: tomcat 启动失败。log如下。INFO: Server startup in 15913 msNOV 4, 2013 11:42:03 AM org.apache.catalina.core.StandardServer awaitSEVERE: StandardServer.await: create[8005]:java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.AbstractPlai 阅读全文

posted @ 2014-03-26 15:48 钟悍 阅读(7055) 评论(0) 推荐(0) 编辑

摘要: $('input[name=source]').eq(0).prop("checked",true); 阅读全文

posted @ 2014-03-26 09:07 钟悍 阅读(284) 评论(0) 推荐(0) 编辑

摘要: var template = kendo.template($("#singleItem").html());var result = template(data);$("#container").append(result);$(".manyCon").kendoTooltip({ position:"bottom", //left right top wrapperClass:"lineWeight", width:370, content:kendo.template($("#m 阅读全文

posted @ 2014-03-26 09:05 钟悍 阅读(1831) 评论(0) 推荐(0) 编辑

2014年3月16日

摘要: 1, Class描述类的类如何获得Class1)Class.forName("com.test.Test");2) Test.class;3) test.getClass();2, Field1) class.getField(String paraName); //获取类class名为paraName的属性对象2) class.getFields();//获取类class的所有属性对象3) field.setAccessible(true); //设置类属性field为可访问。4) field.get(Object object); //获取对象object的field属 阅读全文

posted @ 2014-03-16 22:13 钟悍 阅读(254) 评论(0) 推荐(0) 编辑

2014年3月12日

摘要: java Collection framework 阅读全文

posted @ 2014-03-12 20:54 钟悍 阅读(102) 评论(0) 推荐(0) 编辑

摘要: About hashcode and equalsRule 1: If override equals(), and should override hashcode(), make sure if two object 'equals', then them should have same hashcode. actual, you also break the rule, the compile will pass, but it maybe cause some bugs.Rule 2: If two object not equals, then they hashc 阅读全文

posted @ 2014-03-12 20:53 钟悍 阅读(189) 评论(0) 推荐(0) 编辑

摘要: Many relation database handle a JDBC sql query in blew four steps:1, parse the incoming sql2, compile the sql3, plan/ optimize the sql.4, execute the sql and return dataA Statement will always procceed the four steps for each sql quer sent to the database. A PrepareStatement will pre-execute the ste 阅读全文

posted @ 2014-03-12 20:40 钟悍 阅读(274) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 12 下一页