
程序开发
镜子mirror
积极向上那是理想状态,大放厥词的的吹牛逼那也是理想状态,抱得美人归也是理想状态,任性的挥霍也是理想状态;
“警察”(me):不许动,举起手来。
“理想状态”:我怎么了,一没偷二没抢;
“警察”(me):胡扯,把你的背包中我的“梦”,还给我!
... ...
... ...
...
展开
-
Java 小数 进行格式化 DecimalFormat
DecimalFormat df = new DecimalFormat("###");DecimalFormat df = new DecimalFormat("#,##0.00#");df.format(小数)原创 2015-08-18 15:47:26 · 433 阅读 · 0 评论 -
设计模式题 以下代码是否需要重构,如何重构
class DesignMode{void handle(int type){if(type == 1){function1();}else if(type == 2){function2();}else if(type == 3){function3();}else if(type == 4){function4();}else if(type ==原创 2017-03-03 17:19:48 · 414 阅读 · 1 评论 -
JVM基础性问题,说出以下代码的输出结果,并作出详细的解释。
public class StringConstant {public static void main(String[] args) {String a = "abc";judge(a,"abc");String b = new String("abc");judge(a,b);String c = "a" +"bc";judge(a,c)原创 2017-03-03 15:43:16 · 359 阅读 · 0 评论 -
spring JdbcTemplate 和 spring mybatis 的 update方法的返回值是 Rows matched 不是 rows affected(或者Changed)
测试验证结论:spring +JdbcTemplate 方法 update 和 spring + mybatis 方法 update 的返回值 是 Rows matched 不是 rows affected(或者Changed)。验证方法如下:图片11. 直连数据库的方式 执行结果如下:图片2 2. spring 4.1.0.RELEASE +原创 2017-07-20 18:22:59 · 3374 阅读 · 0 评论 -
请检查如下代码,如有问题,请正确指出!(java、多线程)
package com.test.aha;import com.google.common.collect.Lists;import org.apache.commons.collections.CollectionUtils;import java.io.BufferedReader;import java.io.File;import java.io.FileReader;im原创 2017-08-24 11:44:17 · 246 阅读 · 0 评论 -
小经验:1. tomcat 启动慢;2. service中明明有方法,执行却报 java.lang.NoSuchMethodError
1. 环境描述 :linux centos7 、tomcat 8 、java spring 项目2. 遇到的问题: a) tomcat 启动慢; b) service中明明有方法,执行却报 java.lang.NoSuchMethodError;3. 解决方案: 问题a:tomcat 启动慢,发现日志中启动较慢的模块是:org.apache.catalina.util.Sess...原创 2018-04-04 11:57:34 · 429 阅读 · 0 评论