Object Oriented Programming - Lesson 9: Utility classes and collections

Object Oriented Programming - Lesson 9: Utility classes and collections includes String and StringBuffer, Collections Framework (Collections Interface, ArrayList Class, HashSet Class, HashMap Class), Iterator and Comparator Interface. | LESSON IX. Utility classes and collections Trinh Thanh TRUNG (MSc) trungtt@ Objectives • After this lesson, students can: – Understand the meanings of Wrapper class as well as its main purpose of conversion – Learn how to use mathematic constants and functions – Differentiate between String and StringBuffer and use appropriately – Understand Java Collection Framework and work with Set, List, Map data structure. – Understand the relations between Java Colllection and Iterator and Comparator Content • I. String and StringBuffer • II. Collections Framework – – – – Collections Interface ArrayList Class HashSet Class HashMap Class • III. Iterator and Comparator Interface I. String and StringBuffer StringBuffer is faster than String in concatenation (1/2) • StringBuffer is faster than String when performing simple concatenations – Ex1: String str = new String ("First "); str += "Second"; – Ex2: StringBuffer str = new StringBuffer ("First .

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
12    609    4    29-04-2024
38    50    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.