tailieunhanh - Lecture Object Oriented Programing - Chapter 17: Data structures
After completing this unit, you should be able to: To form linked data structures using references, self-referential classes and recursion, the type-wrapper classes that enable programs to process primitive data values as objects, to use autoboxing to convert a primitive value to an object of the corresponding type-wrapper class, to use auto-unboxing to convert an object of a type-wrapper class to a primitive value. | 17 Data Structures Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd ‘Will you walk a little faster?’ said a whiting to a snail, ‘There’s a porpoise close behind us, and he’s treading on my tail.’ Lewis Carroll There is always room at the top. Daniel Webster Push on—keep moving. Thomas Morton I’ll turn over a new leaf. Miguel de Cervantes OBJECTIVES In this chapter you will learn: To form linked data structures using references, self-referential classes and recursion. The type-wrapper classes that enable programs to process primitive data values as objects. To use autoboxing to convert a primitive value to an object of the corresponding type-wrapper class. To use auto-unboxing to convert an object of a type-wrapper class to a primitive value. To create and manipulate dynamic data structures, such as linked lists, queues, stacks and binary trees. Various important applications of linked data structures. How to create reusable data structures | 17 Data Structures Much that I bound, I could not free; Much that I freed returned to me. Lee Wilson Dodd ‘Will you walk a little faster?’ said a whiting to a snail, ‘There’s a porpoise close behind us, and he’s treading on my tail.’ Lewis Carroll There is always room at the top. Daniel Webster Push on—keep moving. Thomas Morton I’ll turn over a new leaf. Miguel de Cervantes OBJECTIVES In this chapter you will learn: To form linked data structures using references, self-referential classes and recursion. The type-wrapper classes that enable programs to process primitive data values as objects. To use autoboxing to convert a primitive value to an object of the corresponding type-wrapper class. To use auto-unboxing to convert an object of a type-wrapper class to a primitive value. To create and manipulate dynamic data structures, such as linked lists, queues, stacks and binary trees. Various important applications of linked data structures. How to create reusable data structures with classes, inheritance and composition. Introduction Type-Wrapper Classes for Primitive Types Autoboxing and Auto-Unboxing Self-Referential Classes Dynamic Memory Allocation Linked Lists Stacks Queues Trees Wrap-Up Introduction Dynamic data structures Linear data structures Linked lists Stacks Queues Binary trees Type-Wrapper Classes for Primitive Types Type-wrapper classes In package Enable programmers to manipulate primitive-type values as objects Boolean, Byte, Character, Double, Float, Integer, Long and Short Autoboxing and Auto-Unboxing Boxing conversion Converts a value of a primitive type to an object of the corresponding type-wrapper class Unboxing conversion Converts an object of a type-wrapper class to a value of the corresponding primitive type Java automatically performs these conversions (starting with Java SE 5) Called autoboxing and auto-unboxing .
đang nạp các trang xem trước