لن أقول الكثير من الهراء ، سأشاركك فقط.
الرمز المحدد كما يلي:
حزمة اختبار ؛/**** Title Book Information Class* Author lr* version. publishing_house ؛} السلسلة العامة getBook_id () {return book_id ؛} public void setbook_id (سلسلة book_id) {this.book_id = book_id ؛} السلسلة العامة getBook_name () {return book_name ؛ publishing_house ؛} public void setpublishing_house (string publishing_house) {this.publishing_house = publishing_house ؛}@OutdRidepublic String ToString () {// todo todo method method methoded " + publishing ؛اختبار الحزمة
استيراد java.text.collator ؛/**** title الصينية وظيفة فرز السلسلة* author lr* version. collator.getInstance (java.util.locale.china) ؛ public static void main (string [] args) {ArrayList <book> list = new ArrayList <book> () ؛ list.add ("كتاب جديد (" ، "new book" ، "English" ، "English Press") ؛ اضغط ")) ؛ list.add (كتاب جديد (" "،" French "،" French Press ") ؛ List.Add (كتاب جديد (" "،" روسي "،" مطبعة روسية ")) ؛ Collections.sort (List ، New CollectionSeSort ()) ؛ لـ (كتاب كتاب: قائمة) {system.out.println (book) ؛ }} OverRidepublic int compare (كتاب ، كتاب ، كتاب) {// todo method method tuto method stubare_value = collator.compare (book.getbook_name () ، book.getbook_name ()) ؛ if (compare_value>) {return ؛}} if (compare_value <) {المحتوى أعلاه هو الرمز الذي يقدمه المحرر إلى Java لتنفيذ وظيفة الفرز للسلاسل الصينية. آمل أن يكون ذلك مفيدًا للجميع!