文章标题
来源:互联网 发布:网络兼职有哪些 编辑:程序博客网 时间:2024/05/16 13:49
这里仅仅只是一种简单的方法
double num = 3.1415926;
double n = 3;
DecimalFormat d = new DecimalFormat(“#.00”);
这里可以是“0.00”,当然这样更加的简单易懂
System.out.println(d.format(n));
System.out.println(d.format(num));
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- prel 多行注释
- python 字符串转浮点数
- VirtualBox在Linux下安装增强功能时出错
- html页面优化
- 在ubuntu中配置SSH(解决connect to host localhost port 22: Connection refused问题)
- 文章标题
- NuttX_编译系统分析
- android学习笔记——回调机制
- 结合Scikit-learn介绍几种常用的特征选择方法
- 错误票据
- Java 中有三大支柱
- 关于浏览器兼容问题
- android学习笔记——Intent的解析(Intent的隐式调用)
- 工具效率 使用Windows计划任务更新SVN