⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.text.*;import java.util.Locale;class Main {    public static void main(String[] args) {        NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN);        DecimalFormat df = null;        // Test before casting.        if (nf instanceof DecimalFormat) {            // Cast number format.            df = (DecimalFormat)nf;            long lg = 1234;            df.setDecimalSeparatorAlwaysShown(true);            System.out.println(df.format(lg));                       // 1.234,            df.setDecimalSeparatorAlwaysShown(false);            System.out.println(df.format(lg));                       // 1.234            System.out.println(df.isDecimalSeparatorAlwaysShown());  // false        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -