![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
hardy成长之旅
机会垂青于有准备的头脑
展开
-
java 中四舍五入保留一位小数
public class Test {public static void main(String[] args) {double d = 1671.0;DecimalFormat df = new DecimalFormat("#.0");System.out.println(df.format(d / 1000));}}//输出结果为:1原创 2015-10-06 00:41:55 · 10093 阅读 · 0 评论 -
java将字符串分割为指定长度的字符串
import java.util.ArrayList;import java.util.List;public class Test { public static void main(String[] args) { // TODO Auto-generated method stub String s = "1234567"; List<String> list = ...原创 2018-05-29 14:16:46 · 7620 阅读 · 0 评论