Java Double: 四舍五入并设置小数点位数

Categories: Java; Tagged with: ; @ July 29th, 2010 9:13

基础啊基础, 基础牢了省多少时间啊….

(more…)

为Eclipse指定JDK

Categories: Java; Tagged with: ; @ March 27th, 2010 15:23

菜鸟上路记.

image

Java: 计算平均分, 标准差, 标准分

Categories: Java; Tagged with: ; @ January 27th, 2010 21:45

本类提供标准差,标准分计算的Utility.

(more…)

Java 保持小数点后若干位的操作

Categories: Java; Tagged with: ; @ January 26th, 2010 15:18
	DecimalFormat df2  = new DecimalFormat("###.00");

or:

(double) (Math.round(sd3*100)/100.0); 

 

09下高一期终语文-平均分 09下期终英语-平均分 09高一下期中考试-平均分
71.66666666666667 124.0 195.66666666666666

 

=>

09下高一期终语文-平均分 09下期终英语-平均分 09高一下期中考试-平均分
71.67 124.00 195.67

Java: Map遍历

Categories: Java; Tagged with: ; @ January 26th, 2010 10:43
		// 2. 遍历map中所有的元素
		Iterator>> iter = mapSheet.entrySet().iterator();
		while(iter.hasNext()) {
			Entry> entry = iter.next();
			int sheetIndex = entry.getKey(); // Key
			List listReportItems = entry.getValue(); // Value

		}

Newer Posts <-> Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.