Đang chuẩn bị liên kết để tải về tài liệu:
Lecture Java™ How to Program (8/e) - Chapter 20: Generic collections

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

In this chapter, students will be able to: To create generic methods that perform identical tasks on arguments of different types; to create a generic Stack class that can be used to store objects of any class or interface type; to understand how to overload generic methods with non-generic methods or with other generic methods;. | Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. Java collections framework prebuilt data structures interfaces and methods for manipulating those data structures (C) 2010 Pearson Education, Inc. All rights reserved. A collection is a data structure—actually, an object—that can hold references to other objects. Usually, collections contain references to objects that are all of the same type. Figure 20.1 lists some of the interfaces of the collections framework. Package java.util. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. Each primitive type has a corresponding type-wrapper class (in package java.lang). Boolean, Byte, Character, Double, Float, Integer, Long and Short. Each type-wrapper class enables you . | Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. Java collections framework prebuilt data structures interfaces and methods for manipulating those data structures (C) 2010 Pearson Education, Inc. All rights reserved. A collection is a data structure—actually, an object—that can hold references to other objects. Usually, collections contain references to objects that are all of the same type. Figure 20.1 lists some of the interfaces of the collections framework. Package java.util. (C) 2010 Pearson Education, Inc. All rights reserved. (C) 2010 Pearson Education, Inc. All rights reserved. Each primitive type has a corresponding type-wrapper class (in package java.lang). Boolean, Byte, Character, Double, Float, Integer, Long and Short. Each type-wrapper class enables you to manipulate primitive-type values as objects. Collections cannot manipulate variables of primitive types. They can manipulate objects of the type-wrapper classes, because every class ultimately derives from Object. (C) 2010 Pearson Education, Inc. All rights reserved. Each of the numeric type-wrapper classes—Byte, Short, Integer, Long, Float and Double—extends class Number. The type-wrapper classes are final classes, so you cannot extend them. Primitive types do not have methods, so the methods related to a primitive type are located in the corresponding type-wrapper class. (C) 2010 Pearson Education, Inc. All rights reserved. A boxing conversion converts a value of a primitive type to an object of the corresponding type-wrapper class. An unboxing conversion converts an object of a type-wrapper class to a value of the corresponding primitive type. These conversions can be performed automatically (called autoboxing and auto-unboxing). Example: // create integerArray Integer[]

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.