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

📄 main.java

📁 java的经典例子
💻 JAVA
字号:
import java.awt.*;
import java.util.*;
import java.text.*;

class Main extends Frame {
    static int COLWIDTH = 10;

    // Create text area
    TextArea tArea = 
        new TextArea("", 49, 50, TextArea.SCROLLBARS_VERTICAL_ONLY);

    Main(String s) {
        super("Collator Example");

        // Initialize various objects with the text.
        tArea.setText(s);
        tArea.setEditable(false);
        tArea.setFont(new Font("Courier", Font.PLAIN, 12));

        // Add layout to text area and listen for key events.
        add(tArea, BorderLayout.CENTER);

        setSize(400, 400);
        pack();
        show();
    }

    public static void main(String[] args) {
        Locale loc = Locale.FRENCH;

        // Create an instance of a subclass of collator.
        Collator collator = Collator.getInstance(loc);

        int[] decompositions = { 
                                  Collator.NO_DECOMPOSITION,
                                  Collator.CANONICAL_DECOMPOSITION,
                                  Collator.FULL_DECOMPOSITION
                               };

        // Set up strings to sort.
        String[] array = new String[] { 
                   "醔c",
                   "羈c",
                   "郻c",
                   "Abc",
                   "鋌c",
                   "纀c",
                   "abc",
                   "腷c",
            //     "A\u0300bc",    // A grave b c
                   "\u00b5",       // 

⌨️ 快捷键说明

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