字符串格式化

字符串格式化

import java.util.*;

 

public class StringFormat {// 字符串格式化

public static void main(String[] args) {

double e = Math.E;

System.out.format("%f%n", e);

System.out.format(Locale.CHINA , "%-10.4f%n%n",e);

}

}

 

posted @ 2021-10-09 22:45  慢漫曼蔓  阅读(19)  评论(0)    收藏  举报