public static void main(String[] args) ...{
long a=100011;
long b=200022;
Double d=new Double(b-a);
DecimalFormat fmt = new DecimalFormat("##,###,###,###,##0.00");
System.out.println(fmt.format(d/100));
NumberFormat nf = NumberFormat.getCurrencyInstance();
System.out.println(nf.format(88888.88));
}
Calendar calendar = Calendar.getInstance();
//getTime()方法是取得当前的日期,其返回值是一个java.util.Date类的对象
res.setResOpenDate(calendar.getTime());
int day = calendar.get(Calendar.DAY_OF_YEAR);
calendar.set(Calendar.DAY_OF_YEAR, day + 30);
//投票的有效期30天
res.setResEndDate(calendar.getTime());