java:double类型截取俩位小数,不取舍,
public class Split{
public static void main(String[] args){
double pai = 3.14159;
findTwo(pai);
public static void findTwo(double value){
System.out.println(new DecimalFormat("0.##").format(value));
}
}
}
相关文档:
软件名称:图书管理工具
总体设计:
1.
命令行操作方式
2.
欢迎页面
---welcome to visit
software of book
management
Now is ...
& ......
1.Welcome.java
import java.util.Date;
import java.util.Scanner;
public class Welcome {
/**
* @param args
* @throws IOException
*/
public static void main(String[] args){
// TODO Auto-generated method stub
System.out.println("Welcome to vis ......
再次从网上查询,搜到了RXTXcomm.jar包比较好,是封装了comm.jar的方法。
安装:
1.copy rxtxSerial.dll to [JDK-directory]\jre\bin\rxtxSerial.dll
2.copy RXTXcomm.jar to [JDK-directory]\jre\lib\ext\RXTXcomm.jar
&nbs ......
数据库连接池,是一种相当实用的应用程序。它可以保存、维护及创建用户所需的数据库连接。从而使得用户得到一个连接的时间降低90%以上。大大提升了数据库访问的反应时间。
这个是一个开源的代码。大家可以修改它、使用它。
希望我的代码能对大家有用。
此代码,经过1000数量级的多线程并发访问测试。在四核CPU下也进行 ......
中国公历算法不是太难,关键是星期值的确定。这里给出了简单算法:
public static int dayOfWeek(int y, int m, int d) {
int w = 1; // 公历一年一月一日是星期一,所以起始值为星期日
y = (y-1)%400 + 1; //&n ......