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

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.text.ChoiceFormat;class Main {    static public void main(String[] args) {        // Create an empty choice format.        ChoiceFormat form = new ChoiceFormat("");         // Define the integer ranges.        double[] limits = {1,2,3,4,5,6,7};         // Define the strings that map to the ranges.        String[] dayNames = {"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};         // Apply the limits and dayNames.        form.setChoices(limits, dayNames);        // Format the number 2.5        double num = 2.5;        // Format the number and print the result.        System.out.print(form.format(num));          // "Mon"    }}

⌨️ 快捷键说明

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