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));
}
}
}
相关文档:
声明字段映射
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface FiledRef
{
String fieldName();
}
声明表映射
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface TableRef
{
& ......
软件名称:图书管理工具
总体设计:
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 ......
package com.njty.util;
public class Test {
private static final double EARTH_RADIUS = 6378137;
private static double rad(double d)
{
return d * Math.PI / 180.0;
}
  ......
数据库连接池,是一种相当实用的应用程序。它可以保存、维护及创建用户所需的数据库连接。从而使得用户得到一个连接的时间降低90%以上。大大提升了数据库访问的反应时间。
这个是一个开源的代码。大家可以修改它、使用它。
希望我的代码能对大家有用。
此代码,经过1000数量级的多线程并发访问测试。在四核CPU下也进行 ......