摘要: 参考 https://www.cnblogs.com/wxl1640326208/p/11491990.html 阅读全文
posted @ 2020-02-04 17:52 摘珰 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 获取类名: 1、在类的实例中可使用this.getClass().getName();适用于非静态方法,在static method中不能使用该方法; 2、在static method中使用方法:Thread.currentThread().getStackTrace()[1].getClassNa 阅读全文
posted @ 2020-02-04 17:50 摘珰 阅读(271) 评论(0) 推荐(0) 编辑
摘要: java保留两位小数问题: 方式一: 四舍五入,保留两位小数 1 double f = 111231.5585; 2 BigDecimal b = new BigDecimal(f); 3 double f1 = b.setScale(2,BigDecimal.ROUND_HALF_UP).doub 阅读全文
posted @ 2020-02-04 17:46 摘珰 阅读(380) 评论(0) 推荐(0) 编辑
摘要: 参考 https://www.cnblogs.com/coonver/articles/4898027.html 阅读全文
posted @ 2020-02-04 17:41 摘珰 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1 import jxl.*; 2 import java.io.*; 3 public class JXLTest01{ 4 public static void main(String[] args) throws Exception{ 5 //1:创建workbook 6 Workbook w 阅读全文
posted @ 2020-02-04 17:38 摘珰 阅读(417) 评论(0) 推荐(0) 编辑