📄 main.java
字号:
import java.text.RuleBasedCollator;import java.text.ParseException;class Main { public static void main(String args[]) { // Create a simple collator rule. String rules = "< a < b < c < d"; // Create a rule-based collator. try { RuleBasedCollator rbc = new RuleBasedCollator(rules); // Create a clone and print its rule string. RuleBasedCollator rbcCopy = (RuleBasedCollator)rbc.clone(); System.out.println("Copy's rules:" + "\n" + rbc.getRules()); // Tests for equality. if (rbc.equals(rbcCopy)) { System.out.println("Clone is equal to original"); } // Compute hashcode. int hc = rbc.hashCode(); System.out.println("Hash code: " + hc); } catch (ParseException pe) { System.out.println("Parse exception for rules"); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -