Lecture 7: Collections (continued)

Lecture 7: Collections (continued) Polymorphic algorithms in the Java Collection Framework are reusable functionalities; All algorithms take the form of static methods; Many algorithms operate on List instances. | Lecture 7: Collections (continued) Lê Hồng Phương phuonglh@ Department of Mathematics, Mechanics and Informatics, Vietnam National University, Hanoi Content ● Collections ● Interfaces ● Implementations ● Algorithms ● Exercises August, 2012 2 Algorithms ● ● Polymorphic algorithms in the Java Collection Framework are reusable functionalities. All algorithms take the form of static methods. – ● First argument is the collection to operate Many algorithms operate on List instances. August, 2012 3 Algorithms ● ● Polymorphic algorithms in the Java Collection Framework are reusable functionalities. All algorithms take the form of static methods. – ● First argument is the collection to operate Many algorithms operate on List instances. August, 2012 4 Sorting ● ● The sort algorithm reorders a list so that its elements are in ascending order according to an ordering relationship. Natural ordering: – strings: alphabetic order – numbers: signed numerical order – characters: unsigned numerical order – dates: chronological order – objects: ? August, .

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
31    78    1    29-04-2024
11    77    1    29-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.