![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Thinking in java读后感
heydaytoheyong
这个作者很懒,什么都没留下…
展开
-
BigDecimal类的的基本用法【附加:整除报错的解决方案】
一提到Java里面的商业计算,我们都知道不能用float和double,因为他们无法进行精确计算。但是Java的设计者给编程人员提供了一个很有用的类BigDecimal,他可以完善float和double类无法进行精确计算的缺憾。BigDecimal类位于java.maths类包下。首先我们来看下如何构造一个BigDecimal对象。它的构造函数很多,我挑最常用的两个来演示一下:一个就是BigDe原创 2012-08-03 11:35:39 · 14772 阅读 · 1 评论 -
快速比较两个string[] 无序相等
1、第一种方案public static boolean compare(String[] array1, String[] array2) { Set aTarget = new HashSet(); Set bTarget = new HashSet(); aTarget.addAll(Arrays.asList(array1));原创 2012-07-20 14:41:58 · 1335 阅读 · 0 评论 -
List 指定属性排序
不说多了,本人下的小例子,先copy代码到本机上测试吧!下面这个为核心类: package com.heyday.sort;import java.lang.reflect.Method;import java.util.*;/*** * List指定属性排序 * @author "heyong" * */public class ListComparator im原创 2012-06-21 15:01:21 · 2561 阅读 · 0 评论 -
log4j.properties配置详解
Log4J的配置文件(Configuration File)就是用来设置记录器的级别、存放器和布局的,它可接key=value格式的设置或xml格式的设置信息。通过配置,可以创建出Log4J的运行环境。1. 配置文件Log4J配置文件的基本格式如下:#配置根Loggerlog4j.rootLogger = [ level ] , appenderName1 ,翻译 2012-07-30 17:14:48 · 1571 阅读 · 0 评论 -
Map集合按照Value排序(Map value sort)
public static void main(String[] args) { Map map = new HashMap(); map.put("001", 2); map.put("002", 6); map.put("003", 9); map.put("004", 1); map.put("005", 9); List> orderList = n原创 2013-01-03 15:01:49 · 4141 阅读 · 0 评论