摘要: 1 for(int i = 0;i<array.size();i++){ 2 Goods g = array.get(i); 3 File file = new File("d://goodsInfo.txt"); 4 FileOutputStream fos1 = new FileOutputStream(file, true); 5 // 创建FileOutputStream对应的PrintStream,方便操作。PrintStream的写入接口更便利 6 ... 阅读全文
posted @ 2014-03-08 23:17 Mr_Clint 阅读(8837) 评论(0) 推荐(1) 编辑
摘要: 1 户型 2 3 阅读全文
posted @ 2014-03-06 23:40 Mr_Clint 阅读(290) 评论(0) 推荐(0) 编辑
摘要: hibernate4整合spring3 时出现nested exception is java.lang.NoClassDefFoundError:org/hibernate/engine/SessionFactoryImplementor异常原因:3中这样配置 View Code 原因:4中该这样配置 hibernate4 阅读全文
posted @ 2014-03-04 14:07 Mr_Clint 阅读(2582) 评论(0) 推荐(0) 编辑
摘要: 异常:java.lang.NoSuchMethodError:ognl.SimpleNode.isEvalChain(Lognl/OgnlContext;)Z原因:ognl.jar版本bug,或者跟struts 的版本不匹配解决办法:更换为匹配的包 阅读全文
posted @ 2014-02-28 22:09 Mr_Clint 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 异常:java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils原因:commons-lang.jar版本低了解决办法:下载高版本的包,如commons-lang3-3.1.ja 阅读全文
posted @ 2014-02-28 21:43 Mr_Clint 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 报此异常:java.lang.NoSuchMethodError: javax.persistence.OneToOne.orphanRemoval()Z原因:hibernate-jpa-2.0-api-1.0.0.Final.jar会和ejb3-persistence.jar里很多重复,难免会出现冲突情况。解决办法:把ejb3-persistence.jar包删掉, 阅读全文
posted @ 2014-02-28 21:27 Mr_Clint 阅读(220) 评论(0) 推荐(0) 编辑
摘要: public String substring(int beginIndex,int length)。 返回一个新字符串,它是此字符串的一个子字符串。该子字符串从指定的 beginIndex 处开始, length:表示子字符串的长度。 参数: beginIndex - 开始处的索引(包括)。 endindex 结尾处索引(不包括)。 返回: 指定的子字符串。 示例: String str = "ABCDEF";String str1 = str.substring(2, 4); 返回 CD 阅读全文
posted @ 2014-02-22 19:39 Mr_Clint 阅读(217) 评论(0) 推荐(0) 编辑
摘要: public class StringTest {public static void main(String[] args) {StringBuffer i = new StringBuffer("abc");String j = i.reverse().toString();System.out.println(j); }} 阅读全文
posted @ 2014-02-22 10:55 Mr_Clint 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Page:Pagepublic class Page { private int everyPage; //每页显示记录数 private int totalCount; //总记录数 private int totalPage; //总页数 private int currentPage; //当前页 private int beginIndex; //查询起始点 private boolean hasPrePage; //是否有上一页 ... 阅读全文
posted @ 2014-02-20 12:35 Mr_Clint 阅读(344) 评论(0) 推荐(0) 编辑
摘要: 逻辑运算& | 和 && || 的重要区别是:前者是非短路运算,后者是短路运算 阅读全文
posted @ 2014-02-20 12:24 Mr_Clint 阅读(154) 评论(0) 推荐(0) 编辑