Tài liệu Java Collections

Thảo luận trong 'Lập Trình' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    167
    Điểm thành tích:
    0
    Xu:
    0Xu
    Chapter 1: Java Collections Framework: An Overview
    When learning a new computer programming language, one of the first things you tend to ask is how to work
    with large groups of data. This topic is often covered in the second course of the standard curriculum for
    Computer Science as part of a class typically called Data Structures. If you were to look at the class syllabus,
    you'd likely see topics such as linked lists, queues, stacks, and binary trees, among many other data structures.
    In Java, these structures are part of the Java Collections Framework.
    Collections are typically used in a business environment for shortưterm management of information. This
    information may have been retrieved from a database, acquired over the network, or just entered by a user.
    Their primary purpose though is to help the data persist over the lifetime of a program, in a structure that is
    efficient for the data's purpose. Different collections offer different purposes with quick insertions and
    deletions but slower fetches, or the reverse, or something in between. Your typical computer science text
    describes this information in what is called Big O notation and states how fast or slow operations take for each
    data structure.
    What Is This Book About?
    This book is about Java's support for dealing with groups of data. Prior to the Java 2 release, the only standard
    support for data structures and algorithms was a few fairly basic options available through arrays, hash tables,
    and vectors. Many people either created their own standard data structure library or reused one of several
    libraries introduced to deal with collections like the Generic Collection Library for Java (JGL) from
    ObjectSpace. Aside from rolling their own libraries or reusing those created by others, the Collections
    Framework (beginning with what came with the early beta release of the Java 2 platform, version 1.2)
    introduced support into the core Java APIs for manipulating data collections. This book describes how to use
    this Collections Framework. We'll also look at some of the common alternate frameworks available.
    A JavaWorld survey back in the summer of 1998 asked readers whether Sun should scrap its Collections API
    in favor of the more robust JGL (the results are posted at JavaWorld,
    http://www.javaworld.com/jwư08ư1998/jwư08ưpollresults.html). At the time, the Java 2 release wasn't final
    yet, and as Figure 1ư1 shows, most people wanted Sun to dump the Collections Framework in favor of
    licensing JGL.
    Figure 1ư1: The 1998 JavaWorld survey results.
    While there hasn't been a new survey since, many people find the Collections Framework much easier to use.
    In addition, since the framework is a core API, not a thirdưparty library, you do not need to redistribute the
    library with your application. Of course, even Sun doesn't use their own Collections Framework in things like
    the Swing component set yet, whereas all the internal data models are still using the historical collection
    classes. And for what its worth, ObjectSpace hasn't released a new version in close to two years. As of this
    writing in early 2001, they just recently removed a reference from their Web site to the 1.2 release of Java
     

    Các file đính kèm:

Đang tải...
Chủ đề tương tự
  1. Quy Ẩn Giang Hồ
    Trả lời:
    0
    Xem:
    1,175
  2. Thúy Viết Bài

    Tài liệu Bài tập Java

    Thúy Viết Bài, 5/12/13, trong diễn đàn: Lập Trình
    Trả lời:
    0
    Xem:
    742
  3. Thúy Viết Bài
    Trả lời:
    0
    Xem:
    537
  4. Thúy Viết Bài

    Tài liệu Giáo trình Java

    Thúy Viết Bài, 5/12/13, trong diễn đàn: Lập Trình
    Trả lời:
    0
    Xem:
    724
  5. Thúy Viết Bài

    Tài liệu Java lập trình

    Thúy Viết Bài, 5/12/13, trong diễn đàn: Lập Trình
    Trả lời:
    0
    Xem:
    450